You are viewing the documentation for metbit 8.7.1. Change release context
metbit.calibrate
NMR and preprocessing module in metbit 8.7.1.
import metbit.calibrateFunctions
calibrate(X, ppm, calib_type='tsp', custom_range=None)
Calibrate chemical shifts in NMR spectra using known reference peaks.
Parameters: X (np.ndarray or pd.DataFrame): NMR data matrix (rows: spectra, columns: PPM positions). ppm (np.ndarray): 1D array of chemical shift values. calib_type (str): 'tsp', 'glucose', 'alanine', or 'custom'. custom_range (tuple): Optional (start, end) PPM range for custom calibration.
Returns: pd.DataFrame: Calibrated NMR data matrix.