Reads Bruker 1D NMR FIDs from directories, applies apodisation and FFT, phases and calibrates the spectrum, and returns absorption, dispersion, or magnitude mode spectra. Results are assigned to the global environment.
Arguments
- path
Character. Path to the root directory containing Bruker experiment folders.
- exp_type
Named list. Filter for acquisition parameters to select experiments (e.g.,
list(exp = "noesygppr1d")
).- apodisation
Named list. Specifies apodisation function and parameters.
fun
must be one of:"exponential"
,"cosine"
,"sine"
,"sem"
.- zerofil
Integer. Zerofilling exponent (e.g., 1 doubles points, 2 quadruples).
- return
Character. Spectrum type to return:
"absorption"
,"dispersion"
, or"magnitude"
.- verbose
Integer. Verbosity level: 0 = silent, 1 = summary (default), 2 = detailed, 3 = debug mode.
- recursive
Logical. Whether to recursively search subdirectories for FIDs.
- n_max
Integer. Maximum number of experiments to process.
- filter
Logical. Whether to remove experiments with incomplete file structures.
Value
The function assigns three objects into the global environment:
- X
Numeric matrix of spectra (rows = samples, columns = ppm values).
- ppm
Numeric vector of chemical shift axis (ppm).
- meta
Data.frame with spectrometer parameters, row-matched to
X
.
Existing objects named X
, ppm
, or meta
will be overwritten.
Details
Reads FID data from Bruker acquisition folders and applies digital signal processing: apodisation, zerofilling, FFT, phase correction, and calibration to TSP. A common ppm scale is interpolated across spectra.
Apodisation functions:
"exponential"
(requireslb
)"cosine"
,"sine"
,"sem"
See also
read1d
for TopSpin-processed spectra
Other NMR:
alignSegment()
,
binning()
,
cvanova()
,
get_idx()
,
lw()
,
matspec()
,
noise.est()
,
normErectic()
,
read1d()
,
stocsy1d_metabom8-class
,
storm()
Examples
path <- system.file("extdata", package = "metabom8")
read1d_raw(path, exp_type = list(pulprog = "noesygppr1d"),
apodisation = list(fun = "exponential", lb = 0.2), n_max = 3)
#> Reading 1 experiments.
#> Assigning objects X, ppm, meta to global environment.