Working with the Phoenix GridΒΆ

The Phoenix Grid is available via ftp at ``_. The current implementation of StarKit only works with the HiResFITS version of the Phoenix grid. Download the entire grid or portions of it. Then generate a database (it only saves the location of the files and the stellar parameters - not the grid itself):

from import PhoenixSpectralGridIO
grid = PhoenixSpectralGridIO('sqlite:///phoenix.db3', base_dir='/media/data1/grids/phoenix')
where phoenix.db3 is the filename for your database and base_dir needs to have
all the Z* directories of the phoenix grid.

To load the phoenix grid into a database (it will only save the parameters and a path to the file in the database):


This will take some time so get a cup of coffee.

After this the grid can be cut up and be made useable for working with Starkit by writing it to HDF5:

from import PhoenixSpectralGridIO
from import ParameterSet

from astropy import units as u

pgrid = PhoenixSpectralGridIO('sqlite:///phoenix.db3', '/media/data1/grids/phoenix')
fluxes = pgrid.to_hdf('phoenix_mcsnr.h5', (>-1.5, ParameterSet.teff.between(5000, 9000)),
wavelength_range=(2000, 9000),R=10000, clobber=True)

The syntax for the parameter filter uses the sqlalchemy backend.