Learn R Programming

speaq (version 1.2.0)

findShiftStepFFT: 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)

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.

Value

  • corValueThe best correlation value
  • stepAdjThe shift step found by the algorithm

Details

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

See Also

hClustAlign

Examples

Run this code
res=makeSimulatedData();
X=res$data;
groupLabel=res$label;


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

Run the code above in your browser using DataLab