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

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

Description

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

Usage

1
2
3
4
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.

Details

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

Value

corValue

The best correlation value

stepAdj

The shift step found by the algorithm

Author(s)

Trung Nghia Vu

See Also

hClustAlign

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
res=makeSimulatedData();
X=res$data;
groupLabel=res$label;


maxShift=50;
refSpec=X[1,];
tarSpec=X[2,];
adj=findShiftStepFFT(refSpec, tarSpec,maxShift=maxShift);

nghiavtr/speaq documentation built on May 20, 2019, 5:27 p.m.