- PHOENIX homepage : https://phoenix.astro.physik.uni-goettingen.de/
- PHOENIX reference paper : https://arxiv.org/abs/1303.5632v2
- JWST MAST search : https://mast.stsci.edu/search/ui/#/jwst
The FTP links on the PHOENIX website are broken. Converting the format to start with https:// works; see below for an example URL.
To use this repo you'll need to download poetry: https://python-poetry.org/docs/
To install python dependencies use:
poetry installThis creates a virtual env in some OS-dependent config file (see the poetry docs above) which you can find using poetry config --list and select in vscode etc. Or you can change the venv to be local to this folder by doing
poetry config virtualenvs.in-project true
# then make the venv appear:
poetry env list # shows the name of the current environment
poetry env remove <current environment>
poetry install # will create a new environment using your updated configurationThen you should just be able to run the python file in whichever way you like.
Using poetry means that the python dependencies are fully specified and don't break in the future.
To create the HDF5 file, you need to download the wavelength grid into the assets folder. The wavelength grid can be downloaded using (assuming you start in the top-level of the repo):
cd spots_and_faculae_model/assets
wget https://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/WAVE_PHOENIX-ACES-AGSS-COND-2011.fitsThis .fits contains 1x HDU which contains 1D data. The length of this 1D array is the same as the length for all the spectral data; and the values in this array is the corresponding wavelength for the index. i.e. this file maps index -> wavelength (angstroms)
Then to create the HDF5 file, just run spots_and_faculae_model/src/phoenix_grid_creator/fits_to_hdf5.py.
The PHOENIX pages reference ftp links, but the files are actually now found here: https://phoenix.astro.physik.uni-goettingen.de/data/
I believe that the "2011" in many of the file names actually corresponds to the year of the spectral model, rather than the year of upload (which is instead just marked in the server).
We are using the 'HiResFITS' files currently.
All .fits files are gitignored currently. This means that the wavelength grid is NOT stored in this repo and must be downloaded locally (e.g. into spectral_grids/) before recreating the HDF5 spectra grid.
All other spectra downloads are performed automatically & internally by fits_to_hdf5.py. If you need them, the file format conventions for the spectra can be read directly from within PHOENIX_filename_conventions.py. (although for this code you don't need to understand the PHOENIX filenames to use this code; it deals with it all for you.)
example working url format: https://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte06000-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
- the only wavelength grid I can find is WAVE (not the AWAV) which is specified as VACUUM wavelengths. astropy specutils can be used to convert from vacuum to air wavelength if needed (this apparently has a low error)
- there appears to be 1,569,128 wavelength points in total in the PHOENIX fits files I've checked
- JWST Stage 2 products are specified in vacuum wavelength source
Here are some other spectra databases: