petitRADTRANS: Exoplanet Spectra Modeling
- petitRADTRANS is an open-source Python package that models exoplanet atmospheres using fast radiative transfer and retrieval methods.
- It supports both low- and high-resolution spectroscopic computations through correlated-k and line-by-line techniques across diverse observing regimes.
- Its modular design integrates flexible opacity handling, chemistry, cloud modeling, and Bayesian retrieval, making it a reference tool for atmospheric studies.
petitRADTRANS is an open-source Python package for the radiative transfer modeling and atmospheric retrieval of exoplanet and substellar companion spectra. Designed for both low-resolution and high-resolution applications, it enables fast, physically consistent calculations of emission and transmission spectra, integrating flexible opacity, chemistry, and cloud modules. Its modular architecture and efficient computational backend have made it a reference forward model for atmospheric retrievals across diverse targets and observing regimes (Mollière et al., 2019, Nasedkin et al., 2023).
1. Code Architecture and Radiative Transfer Formalism
petitRADTRANS combines a highly optimized FORTRAN backend—responsible for all opacity interpolation, correlated-k binning, and radiative-transfer integration—with a Python user interface that exposes physical and numerical controls (Nasedkin et al., 2023). The core radiative-transfer equation is solved either in emission or transmission geometry, in 1D plane-parallel layers under local thermodynamic equilibrium (LTE):
where , with as the single-scattering albedo, the Planck function, and the mean intensity (Nasedkin et al., 2023, Vasist et al., 2023).
Transmission spectra are computed by integrating the slant optical depth along the line of sight:
The emergent spectrum or transit radius is then derived from the appropriate integration or exponential attenuation (Mollière et al., 2019, Nasedkin et al., 2023, Louie et al., 2024).
petitRADTRANS supports both correlated-k (c-k, R~10³) and line-by-line (lbl, R~10⁶) modes, enabling application to a wide range of spectral resolutions from JWST, HST to high-dispersion ground-based spectrographs (Mollière et al., 2019, Zhang et al., 2024).
2. Opacity Handling and Supported Species
The opacity infrastructure in petitRADTRANS is designed to be extensible and compatible with ExoMol, HITEMP, HITRAN, and custom user-provided databases. In c-k mode, the code utilizes precomputed k-distribution tables accelerated with Gaussian-quadrature in the cumulative opacity coordinate (Mollière et al., 2019, Chubb et al., 2020). For high-resolution modeling, it performs direct line-by-line Voigt-profile computations, allowing simultaneous treatment of multiple isotopologues (e.g., ¹²CO, ¹³CO, H₂¹⁶O, H₂¹⁸O) (Grasser et al., 3 Jul 2025, Picos et al., 3 Jan 2025, Yurchenko et al., 15 Dec 2025).
Supported opacity sources include:
- Molecular line lists: H₂O, CO, CO₂, CH₄, NH₃, HCN, FeH, alkalis (Na, K), TiO, among others, with custom isotopologue selection (Nasedkin et al., 2024, Grasser et al., 3 Jul 2025, Regt et al., 2024).
- Continuum absorbers: collision-induced absorption (CIA; e.g., H₂–H₂, H₂–He, N₂–N₂), H⁻ bound-free/free-free (Nasedkin et al., 2023, Picos et al., 3 Jan 2025).
- Rayleigh scattering: H₂, He, N₂, and others.
- Cloud and haze: clouds implemented via gray decks, power-law, or microphysical (Ackerman & Marley 2001) approaches, with full Mie or Distribution of Hollow Spheres (DHS) scattering for well-characterized condensates (Mollière et al., 2019, Vasist et al., 2023).
The code supports custom addition of new opacities, including recent developments in isotope-specific cross-section grids (e.g., 12 isotopologues of CO₂ via ExoMolOP (Yurchenko et al., 15 Dec 2025)) and PAH extinction (Arenales-Lope et al., 2024).
3. Atmospheric Structure, Chemistry, and Clouds
petitRADTRANS provides extensive flexibility in parameterizing P–T profiles and atmospheric composition:
- Temperature–pressure (T–P) profiles can be supplied as analytic (e.g., Guillot 2010), node-based splines, seven-knot gradient profiles (e.g., Zhang et al. 2023), or modular user-defined functions (Zhang et al., 2024, Nasedkin et al., 2024, Picos et al., 3 Jan 2025).
- Chemistry can be modeled as equilibrium (pre-computed abundance grids, e.g., easyCHEM or FastChem), free parameterized VMRs for each species, or hybrid disequilibrium schemes (quench pressure, K_zz prescription) (Nasedkin et al., 2024, Picos et al., 3 Jan 2025, Grasser et al., 3 Jul 2025).
- Cloud opacities are included through both empirical (gray/power-law) and physically motivated microphysical cloud models, with particle size, mass fraction, base pressure, sedimentation efficiency (f_sed), and vertical mixing (K_zz) as free or grid-based parameters (Mollière et al., 2019, Grasser et al., 3 Jul 2025, Vasist et al., 2023).
Advanced retrievals can handle vertical abundance gradients and disequilibrium as a function of pressure, as demonstrated in the analysis of JWST time-resolved data (Nasedkin et al., 10 Jul 2025).
4. Retrieval Framework and Statistical Methods
petitRADTRANS is directly integrated with Bayesian nested-sampling engines, notably PyMultiNest and UltraNest, for parameter estimation and model selection (Nasedkin et al., 2023, Grasser et al., 3 Jul 2025, Nasedkin et al., 2024). Model parameters typically span T–P gradients, molecular and isotopologue abundances, global metallicity ([M/H]), C/O ratio, cloud properties, wind/rotation (v sin i), surface gravity (log g), planetary radius, and noise/covariance hyperparameters.
Likelihood functions are formulated as Gaussian in the observed spectrum or data vector, with analytic marginalization over linear parameters common for scaling and instrumental nuisance terms. Full correlated-noise treatments employ order-by-order or Gaussian-process kernels in the covariance matrix (Picos et al., 3 Jan 2025, Regt et al., 2024).
Recent developments include Neural Posterior Estimation (NPE), which amortizes inference and enables rapid, simulation-based approximations of posteriors while maintaining accuracy compared to standard nested-sampling (Vasist et al., 2023).
5. Benchmarking, Validation, and Use Cases
petitRADTRANS has been benchmarked against retrieval codes such as PLATON, POSEIDON, TauREx, ARCiS, and NEMESIS, with typical spectral differences <1–5% (often within a fraction of typical JWST noise floors) (Nasedkin et al., 2023, Chubb et al., 2020, Yurchenko et al., 15 Dec 2025). Opacity cross-section and k-table outputs have been validated across independent codes using the same ExoMolOP grids (Yurchenko et al., 15 Dec 2025, Chubb et al., 2020).
Key scientific applications include:
- Precision retrievals of elemental and isotopic ratios (e.g., ¹²CO/¹³CO, H₂O/HDO, C/O) for directly imaged exoplanets and brown dwarfs (Grasser et al., 3 Jul 2025, Stauffenberg et al., 10 Jun 2026, Picos et al., 3 Jan 2025, Regt et al., 2024).
- Time-resolved mapping of temperature inversions and weather phenomena from JWST phase series (Nasedkin et al., 10 Jul 2025).
- Testing chemical equilibrium vs. disequilibrium chemistry, with robust model selection via Bayesian evidence (Nasedkin et al., 2024, Regt et al., 2024).
- Spectral synthesis with custom high-resolution k-tables and cross-sections generated from the ExoMolOP pipeline, including alkali broadening and isotopic mixtures (Yurchenko et al., 15 Dec 2025, Chubb et al., 2020).
6. Practical Configuration and Example Usage
A typical petitRADTRANS workflow involves:
- Instantiation of a
Radtransobject with specified line/continuum species, cloud modules, and wavelength grid. - Loading or precomputing opacity tables (either c-k or lbl), optionally employing ExoMolOP-formatted HDF5 files for custom or isotope-resolved opacities (Yurchenko et al., 15 Dec 2025, Chubb et al., 2020).
- Defining the atmospheric structure: pressure grid, P–T profile, and abundance profiles (free or grid-based).
- Configuration of the retrieval parameter set—priors on physical, chemical, and nuisance parameters.
- Forward modeling/emission or transmission spectrum computation across sampled parameter space.
- (If applicable) Instrumental convolution, Doppler/rotational broadening, and Gaussian process noise models for high-resolution data (Regt et al., 2024, Picos et al., 3 Jan 2025, Grasser et al., 3 Jul 2025).
- Bayesian inference and diagnostic plotting via built-in tools.
Sample pseudocode for a high-resolution emission spectrum with free abundances and gradient P–T profile:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from petitRADTRANS import Radtrans import numpy as np atm = Radtrans( line_species=['H2O', 'CO', '13CO', 'CH4', 'NH3', 'HCN'], rayleigh_species=['H2', 'He'], continuum_opacities=['H2-H2', 'H2-He'], wlen_bords_micron=[2.0, 2.45], R=1e6 # high resolution ) pressures = np.logspace(2, -6, 50) # 50 layers from 100 bar to 1e-6 bar atm.setup_opa_structure(pressures) atm.calc_flux(temperature=T_profile, abundances=abund_dict, gravity=10**logg) |
7. Limitations and Ongoing Developments
The current pressure-temperature-coverage of the main opacity database extends to 3000–3400 K; modeling of ultra-hot exoplanets requires further extension, currently under development (Mollière et al., 2019, Yurchenko et al., 15 Dec 2025). The correlated-k implementation currently makes the uncorrelated-species approximation, which can introduce small errors in strongly overlapping bands. Dedicated H₂/He pressure broadening for lines is a forthcoming feature (currently air-broadening is standard) (Mollière et al., 2019).
The emission module neglects scattering in emission spectra by default, but plans exist for consistent radiative transfer including scattering source terms in future releases (Mollière et al., 2019).
References
- "petitRADTRANS: a Python radiative transfer package for exoplanet characterization and retrieval" (Mollière et al., 2019)
- "Atmospheric retrievals with petitRADTRANS" (Nasedkin et al., 2023)
- "The ESO SupJup Survey VIII. Chemical fingerprints of young L dwarf twins" (Grasser et al., 3 Jul 2025)
- "ExoMol line lists -- LXIII: ExoMol line lists for 12 isotopologues of CO" (Yurchenko et al., 15 Dec 2025)
- "The ExoMolOP Database: Cross-sections and k-tables for Molecules of Interest in High-Temperature Exoplanet Atmospheres" (Chubb et al., 2020)
- "Four-of-a-kind? Comprehensive atmospheric characterisation of the HR 8799 planets with VLTI/GRAVITY" (Nasedkin et al., 2024)
- "Surface pressure impact on nitrogen-dominated USP super-Earth atmospheres" (Chouqar et al., 2023)
- "The ESO SupJup Survey I: Chemical and isotopic characterisation of the late L-dwarf DENIS J0255-4700 with CRIRES" (Regt et al., 2024)
- "Neural posterior estimation for exoplanetary atmospheric retrieval" (Vasist et al., 2023)
- "The JWST Weather Report: retrieving temperature variations, auroral heating, and static cloud coverage on SIMP-0136" (Nasedkin et al., 10 Jul 2025)
- "JWST-TST DREAMS: A Precise Water Abundance for Hot Jupiter WASP-17b from the NIRISS SOSS Transmission Spectrum" (Louie et al., 2024)