Skip to contents

This function starts the actual deconvolution of your spectra and generates for each detected signal a Lorentz curve

Usage

generate_lorentz_curves(data_path, file_format = "bruker", make_rds = FALSE)

Arguments

data_path

(string) path to the parent folder where the original spectra are stored. After deconvolution this folder also contains for each spectrum two .txt files which contain for each spectrum the spectrum approximated from all deconvoluted signals and a parameter file that contains all numerical values of the deconvolution

file_format

(string) default is bruker, the other supported format is jcamp-dx

make_rds

(logic) if you would like to store your results as a rds file, default is set to FALSE, should be set to true to save your results if many spectra are evaluated and therefore computing time increases

Details

First, an automated curvature based signal selection is performed. Each signal is represented by 3 data points to allow the determination of initial Lorentz curves. These Lorentz curves are then iteratively adjusted to optimally approximate the measured spectrum. For each spectrum two text files will be created in the parent folder i.e. the folder given in data path. The spectrum approximated from all deconvoluted signals and a parameter file that contains all numerical values of the deconvolution. Furthermore, the numerical values of the deconvolution are also stored in a data_frame.

Examples

if (FALSE) {
data_path=c("C:/example_data")
spectrum_data <- generate_lorentz_curves(
  data_path = data_path,
  file_format = "bruker",
  make_rds = FALSE)
}