findShiftStepFFT: Finding the shift-step by using Fast Fourier Transform cross-...

findShiftStepFFTR Documentation

Finding the shift-step by using Fast Fourier Transform cross- correlation

Description

This function uses Fast Fourier Transform cross-correlation to find out the shift step between two spectra.

Usage

findShiftStepFFT(refSpec, tarSpec, maxShift = 0, scale = NULL)

Arguments

refSpec

The reference spectrum.

tarSpec

The target spectrum which needs to be aligned.

maxShift

The maximum number of points for a shift step. If this value is zero, the algorithm will check on the whole length of the spectra.

scale

Boolean value (TRUE/FALSE) for scaling data before Fast Fourier Transform cross-correlation step. If scale=NULL but mean/median of absolute data is too small (<1), the scaling will be applied. This might happen for very low abundant spectra like chromatograms. For normal NMR spectra, the scaling is usually not applied.

Value

list of 2: corValue (The best correlation value) and stepAdj (The shift step found by the algorithm)

Author(s)

Trung Nghia Vu

See Also

hClustAlign

Examples

res=makeSimulatedData();
X=res$data;
groupLabel=res$label;
maxShift=50;
refSpec=X[1,];
tarSpec=X[2,];
adj=findShiftStepFFT(refSpec, tarSpec,maxShift=maxShift);
                       

speaq documentation built on May 23, 2022, 5:06 p.m.