SolventSuppression: Suppress the Solvent signal present in each FID.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SolventSuppression.R

Description

Signal smooting for water residuals resonance removal.

Usage

1
2
SolventSuppression(Fid_data, lambda.ss = 1e6, ptw.ss = TRUE,
                               returnSolvent = FALSE, verbose = FALSE)

Arguments

Fid_data

Matrix containing the FIDs, one row per signal, as outputted by ReadFids.

lambda.ss

Penalty on roughness used to calculate the smoothed version of the FID. The higher lambda is, the smoother the estimated solvent signal will be.

ptw.ss

If TRUE, calculates the solvent signal in C using the ptw package which is a lot faster. The R version is only kept in case of problems with the installation of ptw.

returnSolvent

If TRUE, returns a list with the resulting FIDs, the real and imaginary parts of the estimated solvent signal, see the examples.

verbose

If "TRUE", will print processing information.

Details

FIDs usually present a wavy shape. Under the assumption that water is the main compound of the analyzed samples, its signal can be modelled by the smoothing of the FIDs. We then subtract this wave, i.e. the solvent residuals resonance signal, from the original FIDs.

The smoothing is done with a Whittaker smoother which is obtained by the minimization of

V + λ R

where

The larger λ is, the smoother the solvent residuals resonance signal. Eilers (2003) and Frasso & Eilers (2015) suggest different ways to tune λ in order to optimise the smoothing: either visually, by cross-validation or using the V-curve procedure.

Value

If returnSolvent = TRUE, will return a list with the following elements: Fid_data, SolventRe and SolventIm. Otherwise, the function will just return Fid_data.

Fid_data

The matrix of FIDs with the solvent residuals signal removed.

SolventRe

The real part of the solvent signal.

SolventIm

The imaginary part of the solvent signal.

Author(s)

Benoît Legat, Manon Martin & Paul H. C. Eilers

References

Martin, M., Legat, B., Leenders, J., Vanwinsberghe, J., Rousseau, R., Boulanger, B., & Govaerts, B. (2018). PepsNMR for 1H NMR metabolomic data pre-processing. Analytica chimica acta, 1019, 1-13.

Frasso, G., & Eilers, P.H.C. (2015). L-and V-curves for optimal smoothing. Statistical Modelling, 15(1), 91-111.

Rousseau, R. (2011). Statistical contribution to the analysis of metabonomics data in 1H NMR spectroscopy. PhD thesis. Institut de statistique, biostatistique et sciences actuarielles, Université catholique de Louvain, Belgium.

Eilers, P.H.C. (2003). A perfect smoother. Analytical Chemistry, 75(14), 3631-3636.

See Also

See also BaselineCorrection which also uses the Whittaker smoother.

Examples

1
2
3
4
5
6
7
8
require(PepsNMRData)
Ss.fid <- SolventSuppression(Data_HS_sp$FidData_HS_1, returnSolvent=FALSE)

#or
Ss.res <- SolventSuppression(Data_HS_sp$FidData_HS_1, returnSolvent=TRUE)
Ss.fid = Ss.res[["Fid_data"]]
SolventRe = Ss.res[["SolventRe"]]
plot(SolventRe[1,], type="l")

ManonMartin/PEPSNMR documentation built on Nov. 26, 2021, 8:45 p.m.