-- program pp2s : peak-picking to stripes -- the peak-picking is performed on the foremost document (2D or 3D) -- the stripes are created into all the 3D documents in the background -- provided that: -- 1) the option "for all documents" is checked -- 2) the x axes of all spectra correspond to the same nucleus -- 3) the z axes of the 3D spectra correspod to the y axes of the foremost spectrum -- the only parameter is actually the global variable STRIPE_WIDTH STRIPE_WIDTH = STRIPE_WIDTH or 0.5 -- initialization local n = peak() local x = {} local y = {} for i = 1, n do x[i], y[i] = peak( i ) end local f = getf( "x" ) x.M = f.mass f = getf( "y" ) y.M = f.mass stripes( n, x, y, STRIPE_WIDTH ) amp() -- redraws the spectrum