petitRADTRANS.spectral_model

Contents

petitRADTRANS.spectral_model#

SpectralModel object and related. The argument kwargs is not always used in SpectralModel functions, this is by design (see __init__ docstring).

Classes#

SpectralModel

Extension of the Radtrans object. Used to construct custom spectral models.

Module Contents#

class petitRADTRANS.spectral_model.SpectralModel(pressures: numpy.typing.NDArray[numpy.floating] = None, wavelength_boundaries: numpy.typing.NDArray[numpy.floating] = None, line_species: list[str] = None, gas_continuum_contributors: list[str] = None, rayleigh_species: list[str] = None, cloud_species: list[str] = None, line_opacity_mode: str = 'c-k', line_by_line_opacity_sampling: int = 1, scattering_in_emission: bool = True, emission_angle_grid: numpy.typing.NDArray[numpy.floating] = None, anisotropic_cloud_scattering: bool = 'auto', path_input_data: str = None, radial_velocity_semi_amplitude_function: Callable = None, radial_velocities_function: Callable = None, relative_velocities_function: Callable = None, orbital_longitudes_function: Callable = None, temperatures=None, mass_fractions=None, mean_molar_masses=None, wavelengths=None, transit_radii=None, fluxes=None, model_functions_map=None, spectral_modification_functions_map=None, **model_parameters)#

Bases: petitRADTRANS.radtrans.Radtrans

Extension of the Radtrans object. Used to construct custom spectral models.

The parameters required for the Radtrans spectral functions are calculated from “model functions”, which require “model parameters”. All parameters are calculated in order thanks to a topological sorting algorithm. Looping dependencies are not supported by default.

Spectra can be generated with the calculate_spectrum function. Several spectral modification functions are available.

A Data object can be initialized with the init_data function, which can then be used to generate a Retrieval object with the Retrieval.from_data function.

Some features are detailed below.

Automatic wavelength boundaries calculation:

The model wavelength boundaries can be determined from the rebinned_wavelengths model parameter, taking into account Doppler shift if necessary, using the following model parameters (see below for a description):

  • relative_velocities

  • system_observer_radial_velocities

  • is_orbiting

  • orbital_longitudes

  • orbital_phases

  • rest_frame_velocity_shift

  • radial_velocity_semi_amplitude

The size of the arrays is used to generate multiple observations of the spectrum. For example, if n_phases orbital phases are given, the generated spectrum of size n_wavelengths is shifted according to the relative velocity at each orbital phase. This generates a time-dependent spectrum of shape (n_phases, n_wavelengths).

Custom functions and kwargs:

The compute_* functions can be rewritten in scripts if necessary. Functions calculate_* should not be rewritten. Custom functions must include the **kwargs argument, even if it is not used. This is by design, to allow for any model parameter to be used with an arbitrarily complex custom function.

Default model parameters:

Default model parameters used when calling the SpectralModel built-in functions. This list may change when using custom functions. Radtrans spectral parameters can also be used as model parameters (see next section).

airmass:

Airmass of the observations, must be an array with one element per exposure. Used to calculate telluric transmittances and in ground-based high-resolution data preparation.

apply_telluric_lines_removal:

If True, apply the telluric lines removal correction of the retrieval.preparing.polyfit function.

apply_throughput_removal:

If True, apply the instrumental throughput removal correction of the retrieval.preparing.polyfit function.

atmospheric_mixing:

Scaling factor [0, 1] representing how well metals are mixed in the atmosphere. Used to calculate the atmospheric metallicity when the metallicity model parameter is None.

carbon_quench_pressure:

(bar) Pressure where the carbon species are quenched, used with equilibrium chemistry.

co_ratio:

Desired carbon to oxygen ratios, obtained by increasing the amount of oxygen. Can be a scalar or an array with one element per layer. Used to calculate mass fractions when equilibrium chemistry is activated (use_equilibrium_chemistry=True).

constance_tolerance:

Relative tolerance on input resolving power to apply constant or running convolutions.

convolve_resolving_power:

Resolving power of the convolved spectrum, used when the convolve argument is True.

correct_uncertainties:

If True, the uncertainties of the prepared spectrum are corrected from the preparing steps.

filling_species:

Dictionary with filling species as keys and the weights of the mass fractions as values. Unweighted filling species are represented with None. Filling species are used to ensure that the MMR at each layer is 1. See chemistry.utils.fill_atmosphere for more details.

guillot_temperature_profile_gamma:

Ratio between visual and infrared opacity. Used by the Guillot temperature profile (temperature_profile_mode='guillot').

guillot_temperature_profile_infrared_mean_opacity_solar_metallicity:

(cm2.s-1) infrared mean opacity for a solar metallicity (Z = 1) atmosphere. The effective infrared opacity is obtained from this parameter times the metallicity. Used with the Guillot temperature profile (temperature_profile_mode='guillot').

imposed_mass_fractions:

Mass fractions imposed when calculating the mass fractions. See SpectralModel.compute_mass_fractions for more details.

intrinsic_temperature:

(K) The planet’s intrinsic temperature. Used by the Guillot temperature profile (temperature_profile_mode='guillot').

is_around_star:

If True, and if the spectral emission mode is ‘emission’, model parameter star_flux can be calculated. It is then used to calculate stellar_intensities (for emission spectra), and when scaling the spectrum (scale=True).

is_observed:

If True, and if the spectral calculation mode is 'emission', calculates the spectral flux received by the observer, taking into account the distance between the target and the observer.

is_orbiting:

If True, model parameter radial_velocity is calculated from orbital parameters (see previous section).

metallicity:

Ratio between heavy elements and H2 + He compared to solar. Used with equilibrium chemistry.

metallicity_mass_coefficient:

Power of the mass-metallicity relationship. Used to calculate the metallicity.

metallicity_mass_scaling:

Scaling factor of the mass-metallicity relationship. Used to calculate the metallicity.

mid_transit_time:

(s) Mid-transit time of the planet’s primary transit. Used to calculate the transit effect (use_transit_light_loss=True).

modification_arguments:

Dictionary with the SpectralModel modification flags as keys and their status as values. The modification parameters are:

  • scale,

  • shift,

  • use_transit_light_loss,

  • convolve,

  • rebin,

  • prepare.

orbit_semi_major_axis:

(cm) Semi-major axis of the planet’s orbit. Used to calculate the radial velocities, transit effect, and stellar intensities.

orbital_inclination:

(deg) Angle between the normal of the planet orbital plane and the axis of observation, i.e. 90 degree: edge view, 0 degree: top view. Used to calculate the radial velocities, and transit effect.

orbital_longitudes:

(deg) Orbital longitudes of the observation’s exposures. Used to calculate the radial velocities, and transit effect. Can also be calculated from model parameters times or orbital_phases.

orbital_period:

(s) Period of the planet’s orbit. Used to calculate the orbital longitudes and the transit effect.

planet_mass:

(g) Mass of the planet. Can be used to calculate the metallicity, the planet radius, or the reference gravity.

polynomial_fit_degree:

Degree of the polynomial fit used to prepare the spectrum, in the retrieval.preparing.polyfit function

radial_velocity_semi_amplitude:

(cm.s-1) Radial orbital velocity semi-amplitude of the planet (Kp). Used to calculate the planet’s relative velocities. Can be automatically calculated.

rebin_range_margin_power:

Relative wavelength margin to use for the automatic wavelength boundary calculation.

rebinned_wavelengths:
  1. Wavelengths at which to rebin the spectrum (rebin=True).

relative_velocities:

(cm.s-1) Array of relative velocities between the target and the observer. Can be automatically calculated. Used when shifting the spectrum (shift=True).

rest_frame_velocity_shift:

(cm.s-1) Shift in the planet’s rest frame velocity. Used when shifting the spectrum (shift=True).

star_effective_temperature:

(K) Effective temperature of the planet’s star. Used to calculate the stellar intensities.

star_mass:

(g) Mass of the star. Used to calculate the relative velocities.

star_metallicity:

Metallicity of the star in solar metallicity. Used to calculate the metallicity.

star_radius:

(cm) Radius of the planet’s star. Used to calculate the stellar intensities, the scaled spectrum, and the transit effect.

system_distance:

(cm) Distance between the target and the observer. Used to calculate the emission spectrum when is_observed is True.

system_observer_radial_velocities:

(cm.s-1) Array of velocities between the system and the observer.

tellurics_mask_threshold:

Mask wavelengths where the atmospheric transmittance estimate is below this value. Used when preparing the spectrum with retrieval.preparing.polyfit function.

temperature:

(K) When temperature_profile_mode='isothermal', the value of the temperature. When temperature_profile_mode='guillot', it corresponds to the equilibrium temperature.

temperature_profile_mode:

If 'isothermal', the temperature profile is isothermal If guillot, the temperature profile follows the Guillot 2010 temperature profile.

times:

(s) Array of size n_exposures. Used to calculate the orbital longitudes.

transit_duration:

(s) Duration of the planet total transit (T14) Used to calculate the transit effect.

uncertainties:

Spectrum uncertainties. Used when preparing the spectrum with retrieval.preparing.polyfit function.

uncertainties_as_weights:

If True, the uncertainties are used as fit weights when preparing the spectrum. Used when preparing the spectrum with retrieval.preparing.polyfit function.

use_equilibrium_chemistry:

If True, use the built-in precalculated pRT equilibrium chemistry table to calculate the mass fractions. This does not trigger the separate full easyChem chemistry solver and does not override the imposed mass fractions.

verbose:

If True, displays additional information when running some SpectralModel functions.

Radtrans model parameters:

Model parameters used when calling the Radtrans spectral functions.

cloud_f_sed:

Cloud settling parameter.

cloud_hansen_a:

A dictionary of the ‘a’ parameter values for each included cloud species and for each atmospheric layer, formatted as the kzz argument. Equivalent to cloud_particle_mean_radii. If cloud_hansen_a is not included and dist is “hansen”, then it will be computed using Kzz and fsed (recommended).

cloud_hansen_b:

A dictionary of the ‘b’ parameter values for each included cloud species and for each atmospheric layer, formatted as the kzz argument. This is the width of the hansen distribution normalized by the particle area (1/cloud_hansen_a^2).

cloud_particle_number_density_grid:

A dictionary of cloud particle number densities for all cloud species.

cloud_particle_radius_distribution_std:

Width of the log-normal cloud particle size distribution.

cloud_particle_mean_radii:

Dictionary of mean particle radii for all cloud species. Dictionary keys are the cloud species names. Every radius array has same length as pressure array.

cloud_particle_radius_distribution:

The cloud particle size distribution to use. Can be either ‘lognormal’ (default) or ‘hansen’. If hansen, the cloud_hansen_b parameters must be used.

cloud_photosphere_median_optical_depth:

Median optical depth (across wavelength_boundaries) of the clouds from the top of the atmosphere down to the gas-only photosphere. This parameter can be used for enforcing the presence of clouds in the photospheric region.

clouds_particle_porosity_factor:

A dictionary of porosity factors depending on the cloud species. This can be useful when opacities are calculated using the Distribution of Hollow Spheres (DHS) method.

eddy_diffusion_coefficients:

The atmospheric eddy diffusion coefficient in cgs (i.e. \(\\rm cm^2/s\)), at each atmospheric layer (1-d numpy array, same length as pressure array).

emissivities:

Emissivities of the surface (layer with the highest pressure).

frequencies_to_wavelengths:

If True, convert the frequencies (Hz) output to wavelengths (cm)

gray_opacity:

Gray opacity value, to be added to the opacity at all pressures and wavelengths (units \(\\rm cm^2/g\)).

haze_factor:

Scalar factor, increasing the gas Rayleigh scattering cross-section.

irradiation_geometry:

If equal to 'dayside_ave': use the dayside average geometry. If equal to 'planetary_ave': use the planetary average geometry. If equal to 'non-isotropic': use the non-isotropic geometry.

opaque_cloud_top_pressure:

(bar) Pressure where an opaque cloud deck is added to the absorption opacity.

planet_radius:
  1. Radius of the planet.

power_law_opacity_350nm:

Scattering opacity at 0.35 micron, in cgs units (cm^2/g).

power_law_opacity_coefficient:

Has to be given if kappa_zero is defined, this is the wavelength powerlaw index of the parametrized scattering opacity.

reference_gravity:

(cm.s-2) Gravity at the planet’s reference pressure.

reference_pressure:

(bar) Reference pressure used to set the planet’s radius.

reflectances:

Reflectances of the surface (layer with the highest pressure).

return_cloud_contribution:

If True, the cloud contribution is calculated.

return_contribution:

If True the spectral contribution function is calculated.

return_photosphere_radius:

If True, the photosphere radius is calculated and returned. Only for emission spectra.

return_radius_hydrostatic_equilibrium:

If True, the radius at hydrostatic equilibrium of the planet is returned. Only for transmission spectra.

return_rosseland_optical_depths:

If True, the Rosseland opacities and optical depths are calculated and returned. Only for emission spectra.

star_irradiation_angle:

Inclination angle of the direct light with respect to the normal to the atmosphere. Used only in the non-isotropic geometry scenario.

stellar_intensities:

(W.m-2/um) The stellar intensity to use. If None, it is calculated using a PHOENIX model.

variable_gravity:

Standard is True. If False the gravity will be constant as a function of pressure, during the transmission radius calculation.

Args:
pressures:

(bar) array containing the pressures of the model, from lowest to highest.

line_species:

list of strings, denoting which line absorber species to include; must match the opacity file names.

rayleigh_species:

list of strings, denoting which Rayleigh scattering species to include; must match the opacity file names.

continuum_opacities:

list of strings, denoting which continuum absorber species to include; must match the opacity file names.

cloud_species:

list of strings, denoting which cloud opacity species to include; must match the opacity file names.

line_opacity_mode:

if equal to 'c-k': use low-resolution mode, at \(\\lambda/\\Delta \\lambda = 1000\), with the correlated-k assumption. if equal to 'lbl': use high-resolution mode, at \(\\lambda/\\Delta \\lambda = 10^6\), with a line-by-line treatment.

scattering_in_emission:

Will be True by default. If True scattering will be included in the emission spectral calculations. Note that this increases the runtime of pRT!

line_by_line_opacity_sampling:

Will be None by default. If integer positive value, and if mode == 'lbl' is True, then this will only consider every line_by_line_opacity_sampling-nth point of the high-resolution opacities. This may be desired in the case where medium-resolution spectra are required with a \(\\lambda/\\Delta \\lambda > 1000\), but much smaller than \(10^6\), which is the resolution of the lbl mode. In this case it may make sense to carry out the calculations with line_by_line_opacity_sampling = 10, for example, and then re-binning to the final desired resolution: this may save time! The user should verify whether this leads to solutions which are identical to the re-binned results of the fiducial \(10^6\) resolution. If not, this parameter must not be used.

temperatures:

array containing the temperatures of the model, at each pressure.

mass_fractions:

dictionary containing the mass mixing ratios of the model, at each pressure, for every species.

mean_molar_masses:

dictionary containing the mean_molar_masses of the model, at each pressure.

wavelength_boundaries:

(um) list containing the min and max wavelength of the model. Can be automatically determined from

wavelengths:

(um) wavelengths of the model.

transit_radii:

transit radii of the model.

fluxes:

(erg.s-1.cm-2.sr-1/cm) spectral radiosities of the spectrum.

**model_parameters:

dictionary of parameters. The keys can match arguments of functions used to generate the model.

temperatures = None#
mass_fractions = None#
mean_molar_masses = None#
wavelengths = None#
transit_radii = None#
fluxes = None#
model_parameters#
spectral_modification_functions_map#
model_functions_map#
_fixed_model_parameters#
__check_model_parameters_relevance()#
__check_model_functions_map()#
static __check_none_model_parameters(explanation_message_=None, **kwargs)#
static __init_velocities(radial_velocity_semi_amplitude_function, radial_velocities_function, relative_velocities_function, orbital_longitudes_function, relative_velocities=None, system_observer_radial_velocities=None, radial_velocities=None, radial_velocity_semi_amplitude=None, rest_frame_velocity_shift=0.0, orbital_longitudes=None, orbital_phases=None, orbital_period=None, times=None, mid_transit_time=None, is_orbiting=None, **kwargs)#
static __retrieval_parameters_interface(retrieved_parameters, fixed_parameters, line_species, n_layers)#
static _compute_planet_star_centers_distance(orbit_semi_major_axis, orbital_inclination, planet_radius_normalized, star_radius, orbital_longitudes, transit_duration, orbital_period, **kwargs)#

Calculate the sky-projected distance between the centers of a star and a planet. This equation is valid if the eccentricity of the planet orbit is low.

Source: Csizmadia 2020 (https://doi.org/10.1093/mnras/staa349)

Args:

orbit_semi_major_axis: planet orbit semi-major axis orbital_inclination: planet orbital inclination planet_radius_normalized: planet radius over its star radius star_radius: radius of the planet star orbital_longitudes: orbital longitudes of the observation exposures transit_duration: duration of the planet total transit (T14) orbital_period: period of the planet orbit

static _compute_relative_velocities_wrap(radial_velocity_semi_amplitude_function, radial_velocities_function, relative_velocities_function, orbital_longitudes_function, system_observer_radial_velocities, rest_frame_velocity_shift, orbital_period=None, times=None, mid_transit_time=None, orbital_longitudes=None, is_orbiting=False, radial_velocities=None, **kwargs)#

Calculate the planet radial velocities if needed.

static _compute_transit_fractional_light_loss_uniform(planet_radius_normalized, planet_star_centers_distance, planet_radius_normalized_squared=None, **kwargs)#

Calculate the fractional light loss observed when a planet transit a star. This equation neglects the effect of limb-darkening, assuming that the source is uniform.

Source: Mandel & Agol 2002 (https://iopscience.iop.org/article/10.1086/345520)

Args:

planet_radius_normalized: planet radius over its star radius planet_radius_normalized_squared: planet radius over its star radius, squared planet_star_centers_distance: sky-projected distance between the centers of the planet and the star,

normalized over the radius of the star

static _convolve_constant(input_wavelengths, input_spectrum, convolve_resolving_power, input_resolving_power=None, **kwargs)#

Convolve a spectrum to a new resolving power with a Gaussian filter. The original spectrum must have a resolving power very large compared to the target resolving power. The convolution resolving power is given in that case by:

convolve_resolving_power = input_wavelengths / FWHM_LSF (FWHM_LSF <=> “Delta_lambda” in Wikipedia)

Therefore, the full width half maximum (FWHM) of the target line spread function (LSF) is given by:

FWHM_LSF = input_wavelengths / convolve_resolving_power

This FWHM is converted in terms of wavelength steps by:

FWHM_LSF_Delta = FWHM_LSF / Delta_input_wavelengths

where Delta_input_wavelengths is the difference between the edges of the bin. And converted into a Gaussian standard deviation by:

sigma = FWHM_LSF_Delta / 2 * sqrt(2 * ln(2))

Args:

input_wavelengths: (cm) wavelengths of the input spectrum input_spectrum: input spectrum convolve_resolving_power: resolving power of output spectrum input_resolving_power: unused; kept for API compatibility

Returns:

convolved_spectrum: the convolved spectrum at the new resolving power

static _convolve_running(input_wavelengths, input_spectrum, convolve_resolving_power, input_resolving_power=None, **kwargs)#

Convolve a spectrum to a new resolving power. The spectrum is convolved using Gaussian filters with a standard deviation

std_dev = R_in(lambda) / R_new(lambda) * input_wavelengths_bins.

Both the input resolving power and output resolving power can vary with wavelength. The input resolving power is given by:

lambda / Delta_lambda

where lambda is the center of a wavelength bin and Delta_lambda is the difference between the edges of the bin.

The weights of the convolution are stored in a (N, M) matrix, with N being the size of the input, and M the size of the convolution kernels. To speed-up calculations, a matrix A of shape (N, M) is built from the inputs such as:

A[i, :] = s[i - M/2], s[i - M/2 + 1], …, s[i - M/2 + M],

with s the input spectrum. The definition of the convolution C of s by constant weights with wavelength is:

C[i] = sum_{j=0}^{j=M-1} s[i - M/2 + j] * weights[j].

Thus, the convolution of s by weights at index i is:

C[i] = sum_{j=0}^{j=M-1} A[i, j] * weights[i, j].

Args:

input_wavelengths: (cm) wavelengths of the input spectrum input_spectrum: input spectrum convolve_resolving_power: resolving power of output spectrum input_resolving_power: if not None, skip its calculation using input_wavelengths

Returns:

convolved_spectrum: the convolved spectrum at the new resolving power

static _convolve_wrap(wavelengths, convolve_function, spectrum, **kwargs)#

Convolution wrapping function.

static _explained_error(base_error_message, explanation_message)#

Print an error with an explanation.

_get_model_functions_map(update_model_parameters=True, extra_model_parameters=None, custom_map=None)#

Get the model function map. First, get the spectral parameters, find the spectral find the spectral functions from them, then the model functions, then the model parameters. Then, determine the dependencies of each parameter, then topologically sort the model and spectral parameters.

_get_spectral_modification_functions_map(custom_map=None)#

Get the spectral modification functions (scale, shift, etc.) map.

_get_spectral_parameters(remove_flag=False, remove_branching=False)#

Get the spectral parameters by checking the arguments of the spectral functions.

static _rebin_wrap(wavelengths, spectrum: numpy.typing.NDArray, rebin_spectrum_function, **kwargs)#

Wrapper for the rebin functions.

calculate_contribution_spectra(mode=None, **kwargs)#

Calculate the contribution spectra.

Args:
mode:

Can be ‘emission’ or ‘transmission’.

Returns:

The contribution spectra.

calculate_emission_spectrum(reference_gravity: float, planet_radius: float = None, opaque_cloud_top_pressure: float = None, cloud_particle_mean_radii: dict[str, numpy.typing.NDArray[numpy.floating]] = None, cloud_particle_radius_distribution_std: float = None, cloud_particle_radius_distribution: str = 'lognormal', cloud_hansen_a: dict[str, numpy.typing.NDArray[numpy.floating]] = None, cloud_hansen_b: dict[str, numpy.typing.NDArray[numpy.floating]] = None, cloud_particle_number_density_grid: dict[str, numpy.typing.NDArray[numpy.floating]] = None, cloud_f_sed: float = None, eddy_diffusion_coefficients: numpy.typing.NDArray[numpy.floating] = None, haze_factor: float = 1.0, power_law_opacity_350nm: float = None, power_law_opacity_coefficient: float = None, gray_opacity: float = None, cloud_photosphere_median_optical_depth: float = None, cloud_photosphere_wavelength_boundaries: float = None, cloud_fraction: float = 1.0, patchy_clouds: list[str] | tuple[str] = None, complete_coverage_clouds: list[str] = None, irradiation_geometry: str = 'dayside_ave', stellar_intensities: numpy.typing.NDArray[numpy.floating] = None, star_effective_temperature: float = None, star_radius: float = None, orbit_semi_major_axis: float = None, star_irradiation_angle: float = 0.0, reflectances: numpy.typing.NDArray[numpy.floating] = None, emissivities: numpy.typing.NDArray[numpy.floating] = None, additional_absorption_opacities_function: Callable = None, additional_scattering_opacities_function: Callable = None, adaptive_feautrier_iterations: bool = False, chunk_feautrier: bool = False, feautrier_chunk_size: int = 1024, frequencies_to_wavelengths: bool = True, return_contribution: bool = False, return_clear_spectrum: bool = False, return_photosphere_radius: bool = False, return_rosseland_optical_depths: bool = False, return_cloud_contribution: bool = False, target_particle_radii: numpy.typing.NDArray[numpy.floating] = None, target_pressure: numpy.typing.NDArray[numpy.floating] = None, **kwargs) tuple[numpy.typing.NDArray[numpy.floating], numpy.typing.NDArray[numpy.floating], dict[str, Any]]#

Wrapper for the Radtrans calculate_flux function.

calculate_optimal_wavelength_boundaries(rebinned_wavelengths=None, relative_velocities=None, line_opacity_mode=None, line_species=None, line_by_line_opacity_sampling=None, path_input_data=None)#

Return the optimal wavelength boundaries for rebin on output wavelengths. This minimizes the number of wavelengths to load and over which to calculate the spectra. Doppler shifting is also taken into account.

The SpectralModel must have in its model_parameters keys:
  • ‘rebinned_wavelengths’: (um) the wavelengths to rebin to

The SpectralModel can have in its model_parameters keys:
  • ‘relative_velocities’ (cm.s-1) the velocities of the source relative to the observer, in that case the

    wavelength range is increased to take into account Doppler shifting

Returns:

optimal_wavelengths_boundaries: (um) the optimal wavelengths boundaries for the spectrum

calculate_spectral_parameters(pressures=None, wavelengths=None, **kwargs)#

Initialize the temperature profile, mass mixing ratios and mean molar mass of a model.

Args:

pressures: wavelengths:

Returns:

calculate_spectrum(mode='emission', parameters=None, update_parameters=True, telluric_transmittances_wavelengths=None, telluric_transmittances=None, instrumental_deformations=None, noise_matrix=None, scale=False, shift=False, use_transit_light_loss=False, convolve=False, rebin=False, prepare=False, return_additional_outputs=False)#

Calculate a transmission or emission spectrum using the SpectralModel model parameters. The model parameters and spectral parameters can be (re)calculated. The spectrum is calculated using the these parameters with the corresponding Radtrans function, then can be modified by several parameters.

Args:
mode:

Can be ‘emission’ for emission spectrum, or ‘transmission’ for transmission spectrum.

parameters:

Parameters used to calculate the spectrum. If None, the model parameters of the instance are used.

update_parameters:

If True, the model parameters are (re)calculated.

telluric_transmittances_wavelengths:
  1. Wavelengths of the telluric transmittances.

telluric_transmittances:

Telluric transmittances (between 0 and 1). If the ‘airmass’ model parameter is provided, the telluric transmittances at each exposure is modified as T = exp(log(T) * airmass).

instrumental_deformations:

Array that is multiplied to the spectrum after it has been modified. Intended to simulate various instrumental effects such as the blaze function, throughput variation, etc.

noise_matrix:

Array that is added to the spectrum after it has been modified. Intended to be used to simulate noise.

scale:

If True, modify the spectrum according to the scale_spectrum function. By default, scale with respect to star_observed_spectrum (in emission), or star_radius (in transmission).

shift:

If True, modify the spectrum according to the shift_wavelengths function. By default, Doppler-shift the spectrum according to relative_velocities

use_transit_light_loss:

If True, modify the spectrum according to the compute_transit_fractional_light_loss function. By default, apply Eq. 1 of Mandel & Agol, 2002 (https://www.doi.org/10.1086/345520). Limb darkening is not taken into account.

convolve:

If True, modify the spectrum according to the convolve function. By default, convolve the function with a Gaussian kernel of FWHM determined by convolve_resolving_power.

rebin:

If True, modify the spectrum according to the rebin_spectrum function. By default, rebin the spectrum from its native wavelengths to rebinned_wavelengths.

prepare:

If True, modify the spectrum according to the preparing_pipeline```function. By default, prepare the spectrum using the ``polyfit preparing pipeline. Intended for ground-based high-resolution forward models.

return_additional_outputs:

If True, return the Radtrans additional outputs.

Returns:

Wavelengths (cm) and spectra (cm in transmission, erg.cm-2.s-1/cm in emission), for each order, exposure, and wavelength. If return_additional_outputs is True, also return a dict containing additional outputs.

calculate_transmission_spectrum(reference_gravity: float, reference_pressure: float, planet_radius: float, variable_gravity: bool = True, opaque_cloud_top_pressure: float = None, cloud_particle_mean_radii: dict[str, numpy.typing.NDArray[numpy.floating]] = None, cloud_particle_radius_distribution_std: float = None, cloud_particle_radius_distribution: str = 'lognormal', cloud_hansen_a: float = None, cloud_hansen_b: float = None, cloud_particle_number_density_grid: dict[str, numpy.typing.NDArray[numpy.floating]] = None, cloud_f_sed: float = None, eddy_diffusion_coefficients: float = None, haze_factor: float = 1.0, power_law_opacity_350nm: float = None, power_law_opacity_coefficient: float = None, gray_opacity: float = None, cloud_fraction: float = 1.0, patchy_clouds: list[str] | tuple[str] = None, complete_coverage_clouds: list[str] = None, additional_absorption_opacities_function: Callable = None, additional_scattering_opacities_function: Callable = None, frequencies_to_wavelengths: bool = True, return_contribution: bool = False, return_clear_spectrum: bool = False, return_cloud_contribution: bool = False, return_radius_hydrostatic_equilibrium: bool = False, target_particle_radii: numpy.typing.NDArray[numpy.floating] = None, target_pressure: numpy.typing.NDArray[numpy.floating] = None, **kwargs) tuple[numpy.typing.NDArray[numpy.floating], numpy.typing.NDArray[numpy.floating], dict[str, Any]]#

Wrapper for the Radtrans calculate_transit_radii function.

static compute_bins_resolving_power(wavelengths)#

Calculate the resolving power of wavelengths bins. The “resolving power” of the bins is defined here as:

R = wavelengths / wavelength_steps

This is different from the “true” (/spectral) resolving power:

R = wavelengths / FWHM_LSF

where FWHM_LSF is the full width half maximum of the line spread function (aka Delta lambda)

Args:

wavelengths: wavelengths at the center of the bins

Returns:

The resolving power for each bins

static compute_cloud_f_sed(cloud_f_sed: float = None, **kwargs)#

Get the cloud_f_sed parameter. No calculation performed.

static compute_complete_coverage_clouds(complete_coverage_clouds: list[str] = None, **kwargs)#

Get the complete_coverage_clouds parameter. No calculation performed.

static compute_cloud_particle_mean_radii(cloud_particle_mean_radii: dict[str, numpy.typing.NDArray[numpy.floating]] = None, **kwargs)#

Get the cloud_particle_mean_radii parameter. No calculation performed.

static compute_cloud_particle_radius_distribution_std(cloud_particle_radius_distribution_std: float = None, **kwargs)#

Get the cloud_particle_radius_distribution_std parameter. No calculation performed.

static compute_clouds_particle_porosity_factor(clouds_particle_porosity_factor: dict[str, float] = None, **kwargs)#

Get the clouds_particle_porosity_factor parameter. No calculation performed.

static compute_cloud_hansen_a(cloud_hansen_a: dict[str, numpy.typing.NDArray[numpy.floating]] = None, **kwargs)#

Get the cloud_hansen_a parameter. No calculation performed.

static compute_cloud_hansen_b(cloud_hansen_b: dict[str, numpy.typing.NDArray[numpy.floating]] = None, **kwargs)#

Get the cloud_hansen_b parameter. No calculation performed.

static compute_cloud_photosphere_median_optical_depth(cloud_photosphere_median_optical_depth: float = None, **kwargs)#

Get the cloud_photosphere_median_optical_depth parameter. No calculation performed.

static compute_emissivities(emissivities: numpy.typing.NDArray[numpy.floating] = None, **kwargs)#

Get the ‘emissivities’ parameter. No calculation performed.

static compute_eddy_diffusion_coefficients(eddy_diffusion_coefficients: numpy.typing.NDArray[numpy.floating] = None, **kwargs)#

Get the eddy_diffusion_coefficients parameter. No calculation performed.

static compute_feautrier_chunk_size(feautrier_chunk_size: int = 1024, **kwargs)#

Get the feautrier_chunk_size parameter. No calculation performed.

static compute_equilibrium_mass_fractions(pressures, temperatures, co_ratio, metallicity, carbon_quench_pressure=None, numpy_compatible=True)#

Use the per-calculated chemical table to calculate major species mass fractions at equilibrium.

Args:
co_ratio:

Desired carbon to oxygen ratios, obtained by increasing the amount of oxygen.

metallicity:

The desired metallitcities.

temperatures:
  1. desired temperatures.

pressures:

(bar) desired pressures.

carbon_quench_pressure:

(bar) pressure at which to put a simplistic carbon-bearing species quenching.

Returns:

A dict with species names as keys and mass fractions as values.

static compute_gray_opacity(gray_opacity: float = None, **kwargs)#

Get the gray_opacity parameter. No calculation performed.

static compute_haze_factor(haze_factor: float = 1.0, **kwargs)#

Get the haze_factor parameter. No calculation performed.

static compute_mass_fractions(pressures, temperatures=None, imposed_mass_fractions=None, line_species=None, cloud_species=None, filling_species=None, use_equilibrium_chemistry=False, metallicity=None, co_ratio=0.55, carbon_quench_pressure=None, verbose=False, **kwargs)#

Initialize a model mass mixing ratios. Ensure that in any case, the sum of mass mixing ratios is equal to 1. Imposed mass mixing ratios are kept to their imposed value as long as the sum of the imposed values is lower or equal to 1. H2 and He are used as filling gases. The different possible cases are dealt with as follows:

  • Sum of imposed mass mixing ratios > 1: the mass mixing ratios are scaled down, conserving the ratio

between them. Non-imposed mass mixing ratios are set to 0. - Sum of imposed mass mixing ratio of all imposed species < 1: if equilibrium chemistry is used or if H2 and He are imposed species, the atmosphere will be filled with H2 and He respecting the imposed H2/He ratio. Otherwise, the heh2_ratio parameter is used. - Sum of imposed and non-imposed mass mixing ratios > 1: the non-imposed mass mixing ratios are scaled down, conserving the ratios between them. Imposed mass mixing ratios are unchanged. - Sum of imposed and non-imposed mass mixing ratios < 1: if equilibrium chemistry is used or if H2 and He are imposed species, the atmosphere will be filled with H2 and He respecting the imposed H2/He ratio. Otherwise, the heh2_ratio parameter is used.

When using equilibrium chemistry with imposed mass mixing ratios, imposed mass mixing ratios are set to their imposed value regardless of chemical equilibrium consistency.

Args:

pressures: (cgs) pressures of the mass mixing ratios line_species: list of line species, required to manage naming differences between opacities and chemistry cloud_species: list of cloud species, required to not count cloud species in the gas mass fractions. temperatures: (K) temperatures of the mass mixing ratios, used with equilibrium chemistry co_ratio: carbon over oxygen ratios of the model, used with equilibrium chemistry metallicity: ratio between heavy elements and H2 + He compared to solar, used with equilibrium chemistry carbon_quench_pressure: (bar) pressure where the carbon species are quenched, used with equilibrium

chemistry

imposed_mass_fractions: imposed mass mixing ratios use_equilibrium_chemistry: if True, use the built-in precalculated

pRT equilibrium chemistry table

filling_species:

Dictionary with the filling species as keys and the weights of the mass fractions as values. Unweighted filling species are represented with None.

verbose: if True, print additional information

Returns:

A dictionary containing the mass mixing ratios.

static compute_mean_molar_masses(mass_fractions, **kwargs)#

Calculate the mean molar masses.

Args:

mass_fractions: dictionary of the mass fractions of the model **kwargs: used to store unnecessary parameters

Returns:

static compute_metallicity(planet_mass=None, star_metallicity=1.0, atmospheric_mixing=1.0, metallicity_mass_coefficient=-0.68, metallicity_mass_scaling=7.2, verbose=False, metallicity=None, **kwargs)#
static compute_opaque_cloud_top_pressure(opaque_cloud_top_pressure: float = None, **kwargs)#

Get the opaque_cloud_top_pressure parameter. No calculation performed.

static compute_optimal_wavelength_boundaries(rebinned_wavelengths, shift_wavelengths_function=None, relative_velocities=None, rebin_range_margin_power=15, line_opacity_mode=None, line_species=None, line_by_line_opacity_sampling=None, path_input_data=None, **kwargs) numpy.typing.NDArray[numpy.floating]#
static compute_orbit_semi_major_axis(orbit_semi_major_axis: float = None, **kwargs)#

Get the orbit_semi_major_axis parameter. No calculation performed.

static compute_orbital_longitudes(times: numpy.typing.NDArray[numpy.floating] = None, mid_transit_time: float = None, orbital_period: float = None, **kwargs)#
static compute_power_law_opacity_coefficient(power_law_opacity_coefficient: float = None, **kwargs)#

Get the power_law_opacity_coefficient parameter. No calculation performed.

static compute_power_law_opacity_350nm(power_law_opacity_350nm: float = None, **kwargs)#

Get the power_law_opacity_350nm parameter. No calculation performed.

static compute_planet_radius(planet_radius: float = None, reference_gravity: float = None, planet_mass: float = None, **kwargs)#
static compute_radial_velocities(orbital_longitudes, radial_velocity_semi_amplitude, **kwargs)#
static compute_radial_velocity_semi_amplitude(star_mass: float = None, orbit_semi_major_axis: float = None, **kwargs)#

Calculate the planet orbital radial velocity semi-amplitude (aka K_p).

Args:

star_mass: (g) mass of the star orbit_semi_major_axis: (cm) orbit semi major axis **kwargs: used to store unnecessary parameters

Returns:

(cm.s-1) the planet orbital radial velocity semi-amplitude

static compute_reference_gravity(reference_gravity: float = None, **kwargs)#

Get the reference_gravity parameter. No calculation performed.

static compute_reference_pressure(reference_pressure: float = None, **kwargs)#

Get the reference_pressure parameter. No calculation performed.

static compute_reflectances(reflectances: numpy.typing.NDArray[numpy.floating] = None, **kwargs)#

Get the ‘reflectances’ parameter. No calculation performed.

static compute_relative_velocities(radial_velocities, system_observer_radial_velocities=0.0, rest_frame_velocity_shift=0.0, **kwargs)#
static compute_scaled_metallicity(planet_mass, star_metallicity=1.0, atmospheric_mixing=1.0, metallicity_mass_coefficient=-0.68, metallicity_mass_scaling=7.2)#

Calculate the scaled metallicity of a planet. The relation used is a power law. Default parameters come from the source.

Source: Mordasini et al. 2014 (https://www.aanda.org/articles/aa/pdf/2014/06/aa21479-13.pdf)

Args:

planet_mass: (g) mass of the planet star_metallicity: metallicity of the star in solar metallicity atmospheric_mixing: scaling factor [0, 1] representing how well metals are mixed in the atmosphere metallicity_mass_coefficient: power of the relation metallicity_mass_scaling: scaling factor of the relation

Returns:

An estimation of the planet atmospheric metallicity in solar metallicity.

static compute_spectral_parameters(model_functions_map, **kwargs)#
static compute_star_effective_temperature(star_effective_temperature: float = None, **kwargs)#

Get the star_effective_temperature parameter. No calculation performed.

static compute_star_irradiation_angle(star_irradiation_angle: float = 0.0, **kwargs)#

Get the star_irradiation_angle parameter. No calculation performed.

static compute_star_radius(star_radius: float = None, **kwargs)#

Get the star_radius parameter. No calculation performed.

static compute_star_flux(star_effective_temperature, mode, is_around_star, **kwargs)#
static compute_stellar_intensities(star_flux, star_radius, orbit_semi_major_axis, mode, is_around_star, wavelengths=None, **kwargs)#
static compute_temperatures(pressures, temperature_profile_mode='isothermal', temperature=None, intrinsic_temperature=None, reference_gravity=None, metallicity=None, guillot_temperature_profile_gamma=0.4, guillot_temperature_profile_infrared_mean_opacity_solar_metallicity=0.01, guillot_temperature_profile_kappa_ir_z0=None, **kwargs)#
static compute_transit_duration(transit_duration: float = None, **kwargs)#

Get the transit_duration parameter. No calculation performed.

static compute_transit_fractional_light_loss(spectrum, orbit_semi_major_axis, orbital_inclination, star_radius, orbital_longitudes, transit_duration, orbital_period, **kwargs)#

Calculate the transit depth taking into account the transit fractional light loss. Spectrum must be scaled.

Args:
spectrum:

The scaled spectrum.

orbit_semi_major_axis:
  1. Semi-major axis of the planet’s orbit.

orbital_inclination:

(deg) Orbital inclination of the planet’s orbit.

star_radius:
  1. Radius of the planet’s star.

orbital_longitudes:

Orbital longitudes of the observed planet’s transit.

transit_duration:
  1. Duration of the planet’s transit.

orbital_period:
  1. Period of the planet’s orbit.

Returns:

The scaled spectrum, taking into account the transit light loss.

static compute_velocity_range(radial_velocity_semi_amplitude_range, rest_frame_velocity_shift_range, mid_transit_times_range, system_observer_radial_velocities=None, orbital_period=None, orbital_inclination=None, radial_velocity_semi_amplitude_function=None, radial_velocities_function=None, relative_velocities_function=None, orbital_longitudes_function=None, times=None, **kwargs)#
static convolve(input_wavelengths, input_spectrum, convolve_resolving_power, constance_tolerance=1e-06, **kwargs)#
Args:

input_wavelengths: (cm) wavelengths of the input spectrum input_spectrum: input spectrum convolve_resolving_power: resolving power of output spectrum constance_tolerance: relative tolerance on input resolving power to apply constant or running convolutions

Returns:

convolved_spectrum: the convolved spectrum at the new resolving power

classmethod from_radtrans(radtrans, copy_radtrans=False, temperatures=None, mass_fractions=None, mean_molar_masses=None, wavelengths=None, transit_radii=None, fluxes=None, model_functions_map=None, spectral_modification_functions_map=None, **model_parameters)#
classmethod from_retrieval(retrieval_directory: str, sample_extraction_method: Callable = 'median', sample_extraction_method_parameters: dict[str, Any] = None, model_file: str = None, retrieval_name: str = None, pressures: numpy.typing.NDArray[numpy.floating] = None, wavelength_boundaries: numpy.typing.NDArray[numpy.floating] = None, line_species: list[str] = None, gas_continuum_contributors: list[str] = None, rayleigh_species: list[str] = None, cloud_species: list[str] = None, line_opacity_mode: str = 'c-k', line_by_line_opacity_sampling: int = 1, scattering_in_emission: bool = True, emission_angle_grid: numpy.typing.NDArray[numpy.floating] = None, anisotropic_cloud_scattering: bool = 'auto', path_input_data: str = None, radial_velocity_semi_amplitude_function: Callable = None, radial_velocities_function: Callable = None, relative_velocities_function: Callable = None, orbital_longitudes_function: Callable = None, temperatures=None, mass_fractions=None, mean_molar_masses=None, wavelengths=None, transit_radii=None, fluxes=None, **model_parameters)#
get_default_parameters(sort=True, spectral_model_specific=True, from_maps=True)#

Get all the default SpectralModel parameters.

get_model_functions(include_functions=None, exclude_functions=None, from_maps=True, model_functions_map=None, spectral_modification_functions_map=None)#
get_model_parameters(check_relevance=True, from_function_maps=True, model_functions_map=None, spectral_modification_functions_map=None, model_functions=None)#
get_telluric_transmittances(file, relative_velocities=None, rewrite=False, tellurics_resolving_power=1000000.0, **kwargs)#
get_true_parameters(retrieved_parameters: dict) dict[str, float]#

Get the true value of retrieved parameters. Intended to be used with plot_result_corner, for retrieval on simulated data.

Args:

retrieved_parameters: parameters retrieved during the retrieval

Returns:

The true value of the retrieved parameters, in the correct format for plot_result_corner.

get_volume_mixing_ratios()#
init_data(data_spectrum: numpy.typing.NDArray[numpy.floating], data_wavelengths: numpy.typing.NDArray[numpy.floating], data_uncertainties: numpy.typing.NDArray[numpy.floating], data_name: str = 'data', retrieved_parameters: dict[str, dict[str, Any]] = None, model_parameters: dict[str, Any] = None, fixed_special_parameters: dict[str, Any] = None, mode: str = 'emission', update_parameters: bool = True, telluric_transmittances: numpy.typing.NDArray[numpy.floating] = None, instrumental_deformations: numpy.typing.NDArray[numpy.floating] = None, noise_matrix: numpy.typing.NDArray[numpy.floating] = None, scale: bool = False, shift: bool = False, use_transit_light_loss: bool = False, convolve: bool = False, rebin: bool = False, prepare: bool = False) petitRADTRANS.retrieval.data.Data#

Initialize a Data object using a SpectralModel object. Automatically handle the fixed parameters, data mask, and model generating function. Fixed parameters, i.e. model parameters that are not retrieved, are stored within the model generating function.

Args:
data_spectrum:

The data spectrum.

data_wavelengths:

The data wavelengths.

data_uncertainties:

The data uncertainties.

data_name:

The data name.

retrieved_parameters:

A dictionary with retrieved parameter names as keys and dictionaries as values. Those sub-dictionaries must have keys ‘prior_parameters’ and ‘prior_type’. This can also be a list of RetrievalParameter objects.

model_parameters:

Model parameters to use. Should be None by default.

fixed_special_parameters:

In the context of retrieving multiple Data objects, special parameters to be fixed for this Data object, while it may be retrieved for other Data objects of the same retrieval.

mode:

Radtrans spectral mode. Can be “emission” or “transmission”.

update_parameters:

If True, update the model parameters.

telluric_transmittances:

Telluric transmittances of the model.

instrumental_deformations:

Instrumental deformations of the model.

noise_matrix:

Noise matrix of the model.

scale:

If True, the spectrum is scaled.

shift:

If True, the spectrum is Doppler-shifted.

use_transit_light_loss:

If True, the transit light loss effect is taken into account to calculate the spectrum.

convolve:

If True, the spectrum is convolved.

rebin:

If True, the spectrum is re-binned.

prepare:

If True, the spectrum is prepared.

Returns:

A new Data object instance.

init_retrieval(data, data_wavelengths, data_uncertainties, retrieval_directory, retrieved_parameters, model_parameters=None, retrieval_name='retrieval', mode='emission', uncertainties_mode='default', update_parameters=False, telluric_transmittances=None, instrumental_deformations=None, noise_matrix=None, scale=False, shift=False, use_transit_light_loss=False, convolve=False, rebin=False, prepare=False, run_mode='retrieval', amr=False, scattering_in_emission=True, pressures=None, dataset_name='data', **kwargs) petitRADTRANS.retrieval.retrieval.Retrieval#
classmethod load(file, path_input_data=None, overwrite=False)#
static mass2reference_gravity(planet_mass, planet_radius, verbose=False, **kwargs)#
static modify_spectrum(wavelengths, spectrum, mode, scale=False, shift=False, use_transit_light_loss=False, convolve=False, rebin=False, telluric_transmittances_wavelengths=None, telluric_transmittances=None, airmass=None, instrumental_deformations=None, noise_matrix=None, rebinned_wavelengths=None, relative_velocities=None, radial_velocities=None, planet_radius=None, star_flux=None, star_observed_spectrum=None, is_observed=False, star_radius=None, system_distance=None, scale_function=None, shift_wavelengths_function=None, transit_fractional_light_loss_function=None, convolve_function=None, rebin_spectrum_function=None, **kwargs)#
static preparing_pipeline(spectrum, uncertainties=None, wavelengths=None, airmass=None, tellurics_mask_threshold=0.1, polynomial_fit_degree=1, apply_throughput_removal=True, apply_telluric_lines_removal=True, correct_uncertainties=True, uncertainties_as_weights=False, **kwargs)#

Interface with retrieval.preparing.preparing_pipeline.

static rebin_spectrum(input_wavelengths, input_spectrum, rebinned_wavelengths, bin_widths=None, **kwargs)#
static remove_mask(data, data_uncertainties)#
static retrieval_model_generating_function(prt_object: petitRADTRANS.radtrans.Radtrans, parameters: dict[str, Any], pt_plot_mode: None = None, amr: bool = False, fixed_parameters: dict[str, Any] | None = None, mode: str = 'emission', update_parameters: bool = True, telluric_transmittances_wavelengths: numpy.typing.NDArray[numpy.floating] | None = None, telluric_transmittances: numpy.typing.NDArray[numpy.floating] | None = None, instrumental_deformations: numpy.typing.NDArray[numpy.floating] | None = None, noise_matrix: numpy.typing.NDArray[numpy.floating] | None = None, scale: bool = False, shift: bool = False, use_transit_light_loss: bool = False, convolve: bool = False, rebin: bool = False, prepare: bool = False) tuple[numpy.typing.NDArray[numpy.floating], numpy.typing.NDArray[numpy.floating], numpy.typing.NDArray[numpy.floating]]#
static run_retrieval(retrieval_configuration: RetrievalConfig, retrieval_directory, uncertainties_mode='default', n_live_points=100, resume=False, sampling_efficiency=0.8, const_efficiency_mode=False, log_z_convergence=0.5, n_iter_before_update=50, max_iterations=0, save=True, filename='retrieval_parameters', rank=0, **kwargs)#
save(file, save_opacities=False)#
static save_parameters(file, **kwargs)#
static scale_spectrum(spectrum, star_radius, star_observed_spectrum=None, mode='emission', **kwargs)#
static shift_wavelengths(wavelengths_rest, relative_velocities, **kwargs)#
static reference_gravity2mass(reference_gravity, planet_radius, verbose=False, **kwargs)#
update_model_functions_map(update_model_parameters=True)#
tree_flatten()#
classmethod tree_unflatten(aux_data, children)#
update_spectral_calculation_parameters(**parameters)#
classmethod with_velocity_range(radial_velocity_semi_amplitude_range: numpy.typing.NDArray[numpy.floating] = None, rest_frame_velocity_shift_range: numpy.typing.NDArray[numpy.floating] = None, mid_transit_times_range: numpy.typing.NDArray[numpy.floating] = None, times: numpy.typing.NDArray[numpy.floating] = None, system_observer_radial_velocities: numpy.typing.NDArray[numpy.floating] = None, orbital_period: float = None, star_mass: float = None, orbit_semi_major_axis: float = None, rebinned_wavelengths: numpy.typing.NDArray[numpy.floating] = None, orbital_inclination: float = 90.0, mid_transit_time: float = None, radial_velocity_semi_amplitude: float = None, rest_frame_velocity_shift: float = None, shift_wavelengths_function: Callable = None, pressures: numpy.typing.NDArray[numpy.floating] = None, line_species: list[str] = None, gas_continuum_contributors: list[str] = None, rayleigh_species: list[str] = None, cloud_species: list[str] = None, line_opacity_mode: str = 'c-k', line_by_line_opacity_sampling: int = 1, scattering_in_emission: bool = True, emission_angle_grid: numpy.typing.NDArray[numpy.floating] = None, anisotropic_cloud_scattering: bool = 'auto', path_input_data: str = petitradtrans_config_parser.get_input_data_path(), radial_velocity_semi_amplitude_function: Callable = None, radial_velocities_function: Callable = None, relative_velocities_function: Callable = None, orbital_longitudes_function: Callable = None, temperatures=None, mass_fractions=None, mean_molar_masses=None, wavelengths=None, transit_radii=None, spectral_radiosities=None, **model_parameters)#