petitRADTRANS.temperature_profiles.spline#

Functions#

cubic_spline_temperature_profile(→ tuple[jax.Array, float])

Compute a cubic spline profile for temperature based on pressure points.

linear_spline_temperature_profile(...)

Compute a linear spline profile for temperature based on pressure points.

temperature_curvature_prior(→ float)

Compute a curvature prior for a temperature-pressure profile.

Module Contents#

petitRADTRANS.temperature_profiles.spline.cubic_spline_temperature_profile(pressures: jax.typing.ArrayLike, temperature_points: jax.typing.ArrayLike, gamma: float, nnodes: int = 0) tuple[jax.Array, float]#

Compute a cubic spline profile for temperature based on pressure points.

This function computes a cubic spline profile for temperature using pressure and temperature data points, along with a curvature prior.

Args:

pressures: An array of pressure data points. temperature_points: An array of temperature data points. gamma: A parameter controlling the curvature of the spline. nnodes: Number of nodes to use in the spline interpolation.

Defaults to 0, which means automatic determination of nodes.

Returns:
A tuple containing:
  • interpolated_temperatures: Interpolated temperature values based on the cubic spline.

  • prior: Curvature prior value calculated for the spline.

petitRADTRANS.temperature_profiles.spline.linear_spline_temperature_profile(pressures: jax.typing.ArrayLike, temperature_points: jax.typing.ArrayLike, gamma: float, nnodes: int = 0) tuple[jax.typing.ArrayLike, float]#

Compute a linear spline profile for temperature based on pressure points.

This function computes a linear spline profile for temperature using pressure and temperature data points, along with a curvature prior.

Args:

pressures: An array of pressure data points. temperature_points: An array of temperature data points. gamma: A parameter controlling the curvature of the spline. nnodes: Number of nodes to use in the spline interpolation.

Defaults to 0, which means automatic determination of nodes.

Returns:
A tuple containing:
  • interpolated_temperatures: Interpolated temperature values based on the linear spline.

  • prior: Curvature prior value calculated for the spline.

petitRADTRANS.temperature_profiles.spline.temperature_curvature_prior(temperatures: jax.typing.ArrayLike, gamma: float) float#

Compute a curvature prior for a temperature-pressure profile.

This function calculates a curvature prior for a temperature-pressure profile, penalizing deviations from a smooth, low-curvature profile, based on Line 2015.

Args:

temperatures: An array of temperature data points. gamma: The curvature penalization factor.

Returns:

The curvature prior value.