findShiftStepFFT | R Documentation |
This function uses Fast Fourier Transform cross-correlation to find out the shift step between two spectra.
findShiftStepFFT(refSpec, tarSpec, maxShift = 0, scale = NULL)
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. |
list of 2: corValue (The best correlation value) and stepAdj (The shift step found by the algorithm)
Trung Nghia Vu
hClustAlign
res=makeSimulatedData(); X=res$data; groupLabel=res$label; maxShift=50; refSpec=X[1,]; tarSpec=X[2,]; adj=findShiftStepFFT(refSpec, tarSpec,maxShift=maxShift);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.