metbit.annotate_peak
Visualization and apps module in metbit 8.7.5.
import metbit.annotate_peakClasses
annotate_peak
A Dash application for annotating NMR spectra with interactive features. This application allows users to visualize NMR spectra, add annotations, style lines, and export annotations in HTML and JSON formats. Parameters: - spectra: DataFrame containing NMR spectra data. - ppm: List of ppm values corresponding to the spectra. - label: Series or DataFrame containing labels for the spectra. Usage: ```python import pandas as pd df = pd.read_csv('path_to_your_data.csv') spectra = df.iloc[:, 1:] # Assuming first column is not part of spectra ppm = spectra.columns.astype(float).to_list() label = df['Group'] # Assuming 'Group' is the label column annotator = annotate_peak(label, spectra, ppm, label) annotator.run(debug=True, port=8050) ```