Skip to content

Stellar Spectrum

nabajour edited this page Jul 20, 2020 · 2 revisions

A stellar spectrum can be used as input to Alfrodull.

It needs to have the same binning as the opacity file (e.g. input/opac_sample_SI_r5.h5).

The spectrum files contains two tables:

  • wavelengths: center wavelength of the bins, must match opacity file.
  • flux: stellar flux in [J s-1 m-2 m-1]

Provided example files

example input files are provided for Wasp43.

Programming tools

Some helper functions and examples are provided to output a stellar spectrum:

  • tools/alfrodull_input_tools.py: provides load_opacities_wavelength_bins(opac_filename) function to load wavelengths center bins and interfaces from opacity file.
  • tools/phoenix.py: functions to download spectra from Phoenix and interpolate linearly between Phoenix tools.
  • tools/download_and_prepare_phoenix_spectrum.py: functions to integrate spectrum to wavelength grids. Call as script to read generate spectrum.

Jupyter notebook

Use tools/create_alf_stellar_spectrum.ipynb for interactive creation of spectrum and check the result.

Generated spectrum example

In blue, the spectrum interpolated from Phoenix data, in orange, the data rebinned to THOR’s opacity file.