petitRADTRANS.temperature_profiles.madhusudhan
==============================================

.. py:module:: petitRADTRANS.temperature_profiles.madhusudhan


Functions
---------

.. autoapisummary::

   petitRADTRANS.temperature_profiles.madhusudhan.madhusudhan_seager_temperature_profile


Module Contents
---------------

.. py:function:: madhusudhan_seager_temperature_profile(pressures: jax.typing.ArrayLike, log_pressure_points: tuple[float], temperature_reference: float, alpha_points: tuple[float], beta_points: tuple[float]) -> jax.Array

   Calculate temperatures based on the Madhusudhan and Seager (2009) parameterization.

   This function computes temperatures using the Madhu and Seager (2009) parameterization
   for a given set of pressure values, pressure breakpoints, temperature breakpoints,
   alpha values, and beta values.

   Based off of the POSEIDON implementation:
   https://github.com/MartianColonist/POSEIDON/blob/main/POSEIDON/atmosphere.py

   Parameters:
       pressures : (numpy.ndarray)
           An array of pressure values (in bar) at which to calculate temperatures.
       log_pressure_points : (list)
           A list of log10 pressure breakpoints defining different temperature regimes.
           The zeroth element is the minimum pressure, should be log10(press[0]).
           The first element is the 1-2 boundary
           The second element is the level of the inversion
           The third element is the 2-3 boundary.
           The fourth element is the pressure at which the temperature is set (P_set).
       temperature_reference : (float)
           A temperature at log_pressure_points[4] used to constrain the temperature profile.
       alpha_points : (list)
           A list of alpha values used in the parameterization for different regimes.
           Must have length 2.
       beta_points : (list)
           A list of beta values used in the parameterization for different regimes.
           By default, b[0] == b[1] == 0.5, unclear how well this will work if these aren't used!
           Must have length 2.

   Returns:
       temperatures : (numpy.ndarray)
           An array of calculated temperatures (in K) corresponding to the input pressure values.

   Reference:
   - Madhusudhan, N., & Seager, S. (2009). A Temperature and Abundance Retrieval Method for Exoplanet Atmospheres.
     The Astrophysical Journal, 707(1), 24-39. https://doi.org/10.1088/0004-637X/707/1/24


