Skip to contents

Returns the ppm range across all peaks of the provided deconvoluted spectra.

Usage

get_ppm_range(spectrum_data, full_range = FALSE)

Arguments

spectrum_data

A list of deconvoluted spectra as returned by generate_lorentz_curves().

full_range

If TRUE, the full range of the spectra is returned. If FALSE, only the range from the lowest to the highest peak center is returned.

Value

A vector containing the lowest and highest ppm value over all peaks of the provided deconvoluted spectra.

Author

Wolfram Gronwald, 2023: initial version. Tobias Schmidt, 2024: .

Examples

spectrum_data <- generate_lorentz_curves(
    data_path = sim[1:2],
    nfit = 3,
    sfr = c(3.55, 3.35),
    wshw = 0,
    ask = FALSE,
    verbose = FALSE
)
ppm_rng <- get_ppm_range(spectrum_data)
print(ppm_rng)
#> [1] 3.36275 3.51725