flip_.Rd
flip_()
re-orientates/flips the spectrum on the x axis so that the peaks are pointing the correct way.
flip_(x, p, sh)
x | the spectra wanting to be flipped |
---|---|
p | the match ppm variable |
sh | the chemical shift used to calculate orientation given as the upper and lower ppm bounds |
Returns a spectrum (array) with the correct orientation
flip_()
looks at the chemical shift provided by the sh variable and sums the x values in that area.
It then determines if the sum of this area has a positive or negative sign (indicating if in that area, the peak is pointing in the positive or negative direction). If it is in the negative direction, the entire spectrum is mulitplied by -1 and returned.
Kyle Bario kylebario1@gmail.com