This function shifts the x varibale left or right so that it's TSP peak sits at 0 ppm.

cali(x, p)

Arguments

x

The spectrum you want to calibrate as an array

p

The matched ppm variable to the x you want to calibrate

Value

A spectrum that is calibrated to tsp

Details

cali() finds how far away the maximum value of of x between -0.2 and 0.2 is from the ppm variable closest to 0. It then adds and subtracts the appropriate amount of values on either end of the spectrum so that x's TSP peak resides at 0.

See also

Other preproc: bl_(), flip_(), pproc(), readin()

Author

Kyle Bario kylebario1@gmail.com

Examples

readin(path = system.file('extdata/15', package = 'NMRadjustr')) xc <- cali(x, p)