Learning TauREx in 5mn

Table of Contents
Introduction
TauREx is a powerful tool for exoplanet research and education. In this blogpost, we learn in 5mn how to make an exoplanet spectrum with TauREx3.
Installation and Resources
Install TauREx
This is simply done automatically in command line using:
|
|
Note: we recommend to always manage your python codes using virtual environments (conda or venv).
Obtain the opacity data
For an exoplanet atmosphere model, we need the properties of the main opacity sources. Here, we consider molecular absorption (XSEC) and collision induced absorption (CIA). These can be obtained in this repository:
XSEC: zip folder
CIA: zip folder
Note: for this example, the cross-section data has very low resolution (i.e., it is not usable for research purpose). Higher resolution cross-sections (R > 15k) for TauREx are computed by opacity data groups like ExoMol and are available on their websites.
Obtain the template taurex parfile
TauREx (in command line mode) reads “parfile files” to setup the model run. For our example, a template parfile can be obtained here:
TauREx parfile: zip folder
To continue, unzip the XSEC and CIA folders. Create an “input” folder containing the XSEC and CIA folders in the same directory as the example parfile: this will ensure the path of our example are correct Your working directory should look like this:
|
|
This structure makes sense when opening the parfile file. The first Section contains:
|
|
This of course defines the path to our input opacity data.
Setup the model
To setup the model to our liking, we need to provide additional information. Thankfully, this is already done in the “parfile_simple_example.par” file. Nothing needs to be done for our first run, but let’s get through the different sections anyway.
Planet and Star parameters
The modeled system can be defined under the Planet
and Star
sections.
|
|
|
|
By default the units are those of Jupiter (i.e., 1.0 Jupiter radius and 1.0 Jupiter masses) to describe the planet and those for the Sun to describe the host star.
Note: Other types of planet or star models are possible. For instance phoenix
spectra can be used for stellar model. The temperature
parameter is not used for the base transit models, but it plays an essential role in eclipse.
Atmospheric profiles
Now that the system has a star and a planet, the atmospheric 1D structure is described. This includes pressure, thermal, and chemical profiles.
Pressure profiles:
The pressure profile defines the grid to work with and is described under the [Pressure]
section. In the base taurex, only plane-parallel equally log-spaced grid in pressure are included. The altitude-pressure profile is constructed using hydrostatic equilibrium. In practice, the min and max pressures of the modeled atmosphere are provided, with the number of grid points (i.e., numerical resolution):
|
|
Chemical profiles:
The chemical profile is described under the [Chemistry]
section. Here a simple “free” chemistry (also labeled with keywork taurex
) is employed. Trace gases are included using [[gas]]
keyword. The type of profile is specified using various keywork. For this example, the profiles have constant-with-altitude mixing ratios. For instance:
|
|
After the trace gases are added, the atmosphere is filled with the fill_gases
. For a primary atmosphere, it makes sense to use H2 and He as fill_gases since they constitude most of the envelope. A fully working “free” chemistry would look like this:
|
|
Temperature profiles:
The temperature of the atmosphere is parameterized. Here a simple isothermal
profile is used:
|
|
Since isothermal only has a single parameter, here the entire atmosphere will be at T = 1200
kelvin.
Note: 1D plane-parallel eclipse models should produce blackbody emission with isothermal temperature profiles. Other profile options like NPoints
, or Guillot2010
are available (see documentation).
Model and Contributions
Finally, now that we have described all the properties of this exoplanet, we can tell TauREx what model to run. This is done using the [Model]
section. We here run a transmission
model (or transit model), which is specified under the model_type
keyword:
|
|
For the atmosphere to do anything, contributions functions need to be added: you can see this as the bits of physics that need to be modeled in the radiative transfer. At minimum, we include [Absorption]
: this is using your XSEC input folder information to model molecular absorption. We also want to include the continum from collision induced absorption using [CIA]
, and from Rayleigh Scattering using [Rayleigh]
. Clouds are also common on exoplanets. So, constant absorption clouds, with absorption coefficients (flat_mix_ratio
) and top cloud pressure (flat_topP
), can be added via the [[FlatMie]]
contribution keyword. The full Model section looks like:
|
|
Run the model
The last step is to run a model! In command line simply navigate to your working directory and execute:
|
|
The outputs are saved in the “output.hdf5” file and can be used for plotting our further post-processing. Try plotting the spectrum with:
|
|
The list of accessible options for taurex-plot can be obtained using:
|
|
Conclusion
Bravo for running your first TauREx model in < 5mn. Thanks for following this blogpost.
Resources
Where to go next? Have a look at: