Skip to content

spectra

Olivier Scholder edited this page Nov 8, 2018 · 6 revisions

This tool can display spectra, visualize rapidly peaks assignment and perform fast mass calibration. You can give an ITA filename as argument or if none a GUI filedialog will ask you for one. You will then see your spectrum. You can navigate with the scroll of the mouse to zoom in & out. You can use the keyboard + and - to shift your spectra by ±1 Dalton. You can use left-mouse-button and drag to shift your spectra. You can perform very quick mass calibration by Right-Mouse-Click on one measurement peak (hold the mouse) the move to the element mark you want to assign your peak and release the mouse. The mass calibration values should then be updated on the left table and the mass calibration performed live so that you can see immediately the changes.

spectra_screenshot

⚠️ Be aware that the script overwrite the mass-calibration value sf and k0 in the ITA file with the new one found. The peaks used for the mass-calibration is not saved though. It means that if you exit the spectra tool and launch it again on the same ITA file, the mass-calibration used will be the last one saved, but you will need to start it over from scratch if you want to edit it again.

Fragments database

The fragments shown comes from a database delivered with the pySPM library. It is located in pySPM/pySPM/data/elements.db and it is a SQlite database. You can edit it easily to add the missing fragments with free software such as this one: https://sqlitebrowser.org/

How to run the tool?

Either from python code with:

import pySPM.tools.spectra
pySPM.tools.spectra.main(filename)

from the command line

python -m pySPM spectra

or

python -m pySPM spectra filename