pysnid

Tools to run and read SNID


License
GPL-3.0
Install
pip install pysnid==0.4.2

Documentation

PyPI

pysnid

simple python wrapper to run SNID

Installation

Assuming you already have snid installed see here

Simply pip install pysnid

Usage

If you want to fit a spectra stored under filename=YOUR_DIR_PATH/spectra.ascii Then:

import pysnid
snidres = pysnid.run_snid(filename)

snidres is a custom made object (SNIDReader) that contains useful tools to access and visualise SNID input and output. the input data is stored as snidres.data (DataFrame) and the snid result table as snidres.results.

for instance:

snidres.results

To visualize the template matching do (here the best matches 1, 2 and 4 (only the fist is shown by default) :

snidres.show(models=[1,2,4])

Some more details

pysnid.run_snid() creates by default a new h5 file with the same path as the input file but for the extension replaced by _snid.h5. Use pysnid.SNIDReader.from_filename(outfile) to read this file.