A simple library to load SPE file for spectroscopy
If git
is installed in your environment,
pip install git+https://github.com/fujiisoup/spe_parser.git
to install spe_parser
.
If not, download the package, and do the following
python setup.py install
import spe_parser
spe_parser.np_open('path/to/spe_file.spe')
If xarray
is installed in your device, you can do
spe_parser.xr_open('path/to/spe_file.spe')
which gives more complete information in the file.
The metadata can be obtained by
data = spe_parser.xr_open('path/to/spe_file.spe', attributes='all')
then, the metadata will be stored in the xr.DataArray
. You can see the contents by
for key, item in data.attrs.items():
print(key, item)
This package is still under the development. Any API may be the subject of the future change.