Skip to contents

Calibrate 1D NMR spectra to a doublet peak (e.g. glucose or alanine) by aligning to a known coupling pattern.

Usage

.calibrate_doub(
  X,
  ppm,
  type = c("glu", "ala"),
  j_const = c(0.006, 0.007),
  sg_length = 13
)

Arguments

X

Numeric matrix. NMR data with spectra in rows.

ppm

Numeric vector. Chemical shift positions corresponding to columns of X.

type

Character or numeric. Use "glu" (glucose) or "ala" (alanine) for predefined doublet regions, or a numeric vector with custom ppm range.

j_const

Numeric vector. Expected J-coupling range in ppm (default for glucose).

sg_length

Integer. Smoothing window length for Savitzky-Golay filter.

Value

Calibrated numeric matrix of the same dimensions as X.