Currently the TIC is calculated by sum(spectrum@intensity) but this is only correct if all spectrum@mass values are equally spaced. For most spectra generated by Bruker devices this isn't true, because the difference between to mass values increases.
Something like (head(intensity, -1)+tail(intensity, -1))/2 * diff(mass) is needed.
Currently the TIC is calculated by
sum(spectrum@intensity)
but this is only correct if allspectrum@mass
values are equally spaced. For most spectra generated by Bruker devices this isn't true, because the difference between to mass values increases. Something like(head(intensity, -1)+tail(intensity, -1))/2 * diff(mass)
is needed.