Spectrum Analysis

Hello all,

I am trying to use the TSpectrum package to estimate the background of a spectrum. My problem is that the spectra are absorption spectra so there are no ‘peaks’ but only ‘valleys’. Is there a way to use TSpectrum to find the background of such a spectrum? I might also be interested in using the other functionality of this class for other tasks in the future but right now my main concern is background estimation. Everything I have found in the documentation and on these boards has had to do with spectra that have peaks. I need the opposite - background and valleys.

Kenneth Carrell

a simple suggestion: replace the contents y(i) of your histogram h with maximum ymax=h->GetMaximum() by
y(i) = abs(ymax-y(i)) or abs(2*ymax-y(i))


That is basically what I am doing now and it seems to work alright. I am trying to normalize the spectrum, though, so in order to preserve line strengths, etc, I have to invert the spectrum and background back to the original. I guess it “works” but it is not ideal - it would be much easier to do it in one step instead of inverting it and then inverting it back again. I was hoping there was a switch or variable I could set to tell it to find the “top background” instead of the “bottom background” if that makes sense.