I'm starting to look at ways to analyze the output of a mass spectrometer. My first searches led to some white papers far from what I'm looking for (complex molecules vs simple atoms for me). With mass spectrometers being over a century old I'd thought it'd be easy to find algorithm to extract data from the spectra, but no luck so far.
So, I have a array of B/I points, I being the intensity which has some peaks I want to match to some atoms with various states of ionization. I also have a list of likely atoms and their possible charges (i.e. species), for instance:
A;Name;Mass;Abundancy;Z
1;H;1.007825037;99.985;1
2;H;2.014101787;0.015;1
3;He;3.016029297;0.00014;2
4;He;4.00260325;99.99986;2
6;Li;6.0151232;7.5;3
...about 300 species listed
The data looks like this:
7.685483E+1 7.456893E-13
7.685368E+1 9.060985E-13
7.685262E+1 1.510505E-13
7.685148E+1 1.550802E-12
7.685043E+1 2.034891E-12
7.684936E+1 -2.060149E-14
7.684825E+1 1.334606E-12
7.684711E+1 1.191975E-12
...60000 lines like that
Now I'm looking for a way to automatically find the species in the scan, and their relative quantities bearing in mind that:
- some peaks are very large and reach saturation (can't match with a gaussian)
- some peaks are very narrow (one single sample)
- some are negative (apparently where the electron beam went through, I'm not clear on that; or when the calibration is off)
- there's a wild variation in peak intensity, by several orders of magnitude (even looking at the graph in log scale it's hard to see some minor but present ones)
- some species are far more likely than others (N vs U)
- it all depends on the charge/mass ratio of the ions via the formula
B=a+b*(A/q)^½
where a and B depends on the calibration and should be found by the algo based on some large and always present reference peaks.
Are there standard algorithms for that ? And if not where should I start (I'm not a physicist) ?