This is a set of several scripts and packages that will integrate atmospheric modeling (in the form of atmos or PyAtmos into the bioverse pipeline.
The primary addition is the package atmos_to_PSG
developed by Estelle Janin and Tessa Fisher, which will take the profile.pt and hcaer.out files produced by an atmos model and use them to generate a configuration model for the NASA Planetary Spectrum Generator and submit it. The resulting spectral data file can then used, for example, as input for bioverse's t_ref
function.
Note: if you're using PyAtmos, insert the following code at line 401 of simulation.py
:
self._copy_container_file(self._atmos_directory+'/PHOTOCHEM/OUTPUT/hcaer.out', output_directory)
self._copy_container_file(self._atmos_directory+'/PHOTOCHEM/OUTPUT/profile.pt', output_directory)
atmos_to_PSG
is made up of two functions, atmosatm
and psgspec
. The functions are designed to run in sequence one after another--first atmosatm
, then psgspec
.
Creates a configuration file from the profile.pt and hcaer.out files. Parameters:
- model: the name of the folder containing the profile.pt and hcaer.out files
- tel: Optional. The telescope configuration used in generating the spectrum. Options: 'JWST', 'LUVOIR', 'HabEx','Keck_HIRES', 'HST', and 'Nautilus'
- filebase : Optional. The prefix used on the name of the resulting configuration file
- null_spec : Determines whether or not the resulting configuration has the atmospheric species of interest removed, for use with bioverse's
t_ref
function. Requires a value for removed_gas (see below) - removed_gas: The atmospheric species of interest that's removed to produce a null spectrum for use with
t_ref
. Options: 'H2O', 'CH4', 'C2H6', 'CO2', 'O2', 'O3', 'CO', 'H2CO', 'HNO3', 'NO2', 'SO2', 'N2O', and 'N2' - star: optional. The spectral class of the star that the simulated planet orbits. Options: O, B, A, F, G, K, and M. Note: may require changing the pstar value in the
PLANET.dat
file of the atmos template you're using.
Note: if you're using PSG locally via Docker, the coronagraph options for tel (HabEx and LUVOIR) are extremely computationally intensive, and may run quite slowly.
- model: the name desired for output file(s)
- newf: the configuration file generated by atmosatm
- showplot: Determines whether or not psgspec generates and displays a spectral radiance plot
- null_spec: Determines whether or not the configuration file for the null spectrum is used, for use with bioverse's
t_ref
function.
Required packages:
- NumPy
To do:
- Add options for class of star
- Add more telescopes as options