spa-on-python
spa-on-python copied to clipboard
Read Nicolet/Thermo Omnic files on python (.spa).
Read SPA on python
Usage:
spectra, wavelength, title = read_spa(filepath)
This python function is based on LoadSprecta from matlab. It allows working with FTIR spectrums.
Example
For importing a lot of file you can use pathlib:
from LoadSpectrum import read_spa
import pathlib
basepath = '.'
paths = [str(x) for x in list(pathlib.Path(basepath).rglob('*.spa'))]
print('Files detected: {}'.format(len(paths)))
for path in paths:
spectra_tmp, wavelength_tmp, title_tmp = read_spa(path)
License
GNU General Public License v3.0 or later
See COPYING to see the full text.