FourierTransform: Applies the fourier transforationm to the FIDs.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/FourierTransform.R

Description

The function takes the FIDs in the time domain and translate it into the frequency domain. It also converts the frequency scale from hertz to part per million (ppm).

Usage

1
2
FourierTransform(Fid_data, Fid_info = NULL, SW_h = NULL, SW = NULL, 
                 O1 = NULL, reverse.axis = TRUE, verbose = FALSE)

Arguments

Fid_data

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

Fid_info

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

SW_h

Sweep Width in hertz. If given, the value in Fid_info is ignored.

SW

Sweep width in ppm. If given, the value in Fid_info is ignored.

O1

Spectrometer frequency offset. If given, the value in Fid_info is ignored.

reverse.axis

If TRUE, the frequency scale is reversed.

verbose

If"TRUE", will print processing information.

Details

The number of points m doesn't change and the frequency interval is from -SW/2 to SW/2 - SW/m (the -SW/m is due to the fact that we only have m points, not m+1 and the fourier transform is periodic with period SW so it is the same at -SW/2 and SW/2 anyway).

SW, SW_h and O1 are usually taken from the Fid_info matrix. SW and SW_h are assumed to be the same for every FID since their column names are shared.

The frequency scale is dependent on the kind of spectrometer used, more precisely on its external magnetic field. We therefore translate it to a ppm (part per million) scale which is independent of this external magnetic field thanks to the recovered transmitter frequency offset value (O1).

Value

RawSpect_data

The matrix of spectra in ppm.

Author(s)

Benoît Legat & Manon Martin

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.

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

Examples

1
2
require(PepsNMRData)
FT.spec <- FourierTransform(Data_HS_sp$FidData_HS_3,FidInfo_HS_sp, SW_h = 12019.23)

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