Model

class kelp.Model(hotspot_offset=None, alpha=None, omega_drag=None, A_B=None, C_ml=None, lmax=None, a_rs=None, rp_a=None, T_s=None, planet=None, filt=None, stellar_spectrum=None)[source] [edit on github]

Bases: object

Planetary system object for generating phase curves

Parameters:
hotspot_offsetfloat

Angle of hotspot offset [radians]

alphafloat

Dimensionless fluid number

omega_dragfloat

Dimensionless drag frequency

A_Bfloat

Bond albedo

C_mlarray-like, list

Spherical harmonic coefficients

lmaxint

Maximum \(\ell\) in spherical harmonic expansion

a_rsfloat

Semimajor axis in units of stellar radii

rp_afloat

Planet radius normalized by the semimajor axis

T_sfloat [K]

Stellar effective temperature

planetPlanet

Planet instance which can be specified instead of the three previous parameters

filtFilter

Filter of observations

stellar_spectrumStellarSpectrum

Stellar spectrum (if not supplied, assumes a Planck function at temperature T_s.)

Methods Summary

H(l, theta)

Hermite Polynomials in \(\tilde{\mu}(\theta)\).

albedo_redist(temp_map, theta, phi)

Compute the Bond albedo and heat redistribution efficiency for temp_map.

h_ml(m, l, theta, phi)

The \(h_{m\ell}\) basis function.

integrated_blackbody(n_theta, n_phi[, f, cython])

Integral of the blackbody function convolved with a filter bandpass.

integrated_temperatures([n_theta, n_phi, f])

Compute the integrated dayside and nightside temperatures for the temperature map.

mu(theta)

Angle \(\mu = \cos(\theta)\)

phase_curve(xi, omega, g[, n_theta, n_phi, ...])

Reflected light phase curve for a homogeneous sphere by Heng, Morris & Kitzmann (2021) with the thermal phase curve for a planet represented with a spherical harmonic expansion by Morris et al. (in prep).

reflected_phase_curve(xi, omega, g)

Reflected light phase curve for a homogeneous sphere by Heng, Morris & Kitzmann (2021).

temperature_map(n_theta, n_phi[, f, cython])

Temperature map as a function of latitude (theta) and longitude (phi).

thermal_phase_curve(xi[, n_theta, n_phi, f, ...])

Compute the thermal phase curve of the system as a function of observer angle xi.

tilda_mu(theta)

The normalized quantity \(\tilde{\mu} = \alpha \mu(\theta)\)

Methods Documentation

H(l, theta)[source] [edit on github]

Hermite Polynomials in \(\tilde{\mu}(\theta)\).

Parameters:
lint

Implemented through \(\ell \leq 7\).

thetafloat

Angle \(\theta\)

Returns:
resultndarray

Hermite Polynomial evaluated at angles \(\theta\).

albedo_redist(temp_map, theta, phi)[source] [edit on github]

Compute the Bond albedo and heat redistribution efficiency for temp_map.

Parameters:
temp_mapndarray

Temperature map produced by e.g. temperature_map.

thetandarray

Latitudes produced by e.g. temperature_map.

phindarray

Longitudes produced by e.g. temperature_map.

Returns:
bond_albedofloat

Bond albedo

epsilonfloat

Heat redistribution efficiency

h_ml(m, l, theta, phi)[source] [edit on github]

The \(h_{m\ell}\) basis function.

Note

It is assumed that theta and phi are linearly spaced and always increasing.

Parameters:
mint

Spherical harmonic m index

lint

Spherical harmonic l index

thetandarray

Latitudinal coordinate

phindarray

Longitudinal coordinate

Returns:
hmlndarray

\(h_{m\ell}\) basis function.

integrated_blackbody(n_theta, n_phi, f=0.7071067811865476, cython=True)[source] [edit on github]

Integral of the blackbody function convolved with a filter bandpass.

Parameters:
n_thetaint

Number of grid points in latitude

n_phiint

Number of grid points in longitude

ffloat

Greenhouse parameter (typically 1/sqrt(2)).

Returns:
interp_bbfunction

Interpolation function for the blackbody map as a function of latitude (theta) and longitude (phi)

integrated_temperatures(n_theta=100, n_phi=100, f=0.7071067811865476)[source] [edit on github]

Compute the integrated dayside and nightside temperatures for the temperature map.

Note

The dayside/nightside integrated temperatures reported by this function are weighted by their emitted power, i.e. we take the 1/4 root of the mean of the temperature raised to the fourth power.

Parameters:
n_thetaint

Number of grid points in latitude

n_phiint

Number of grid points in longitude

ffloat

Greenhouse parameter (typically 1/sqrt(2)).

cythonbool

Use cython implementation of the hml basis. Default is True, yields a factor of ~two speedup.

Returns:
daysidefloat

Integrated dayside temperature [K]

nightsidefloat

Integrated nightside temperature [K]

mu(theta)[source] [edit on github]

Angle \(\mu = \cos(\theta)\)

Note

It is assumed that theta is linearly spaced and always increasing.

Parameters:
thetandarray

Angle \(\theta\)

phase_curve(xi, omega, g, n_theta=20, n_phi=200, f=0.7071067811865476, cython=True, quad=False, check_sorted=True, _temperature_map=None)[source] [edit on github]

Reflected light phase curve for a homogeneous sphere by Heng, Morris & Kitzmann (2021) with the thermal phase curve for a planet represented with a spherical harmonic expansion by Morris et al. (in prep).

Parameters:
xindarray

Orbital phases of each observation defined on (-pi, pi)

omegafloat

Single-scattering albedo as defined in

gfloat

Scattering asymmetry factor, ranges from (-1, 1).

n_thetaint

Number of grid points in latitude

n_phiint

Number of grid points in longitude

ffloat

Greenhouse parameter (typically 1/sqrt(2)).

cythonbool (default is True)

Use Cython implementation of the integrated_blackbody function (deprecated). Default is True.

quadbool (default is False)

Use dblquad to integrate the temperature map if True, else use trapezoidal approximation.

check_sortedbool (default is True)

Check that the xi values are sorted before passing to cython (carefully turning this off will speed things up a bit)

Returns:
phase_curvePhaseCurve

Flux ratio between the reflected planetary flux and the stellar flux in units of ppm.

A_gfloat

Geometric albedo derived for the planet given {omega, g}.

qfloat

Integral phase function

reflected_phase_curve(xi, omega, g)[source] [edit on github]

Reflected light phase curve for a homogeneous sphere by Heng, Morris & Kitzmann (2021).

Parameters:
xindarray

Orbital phases of each observation defined on (-pi, pi)

omegafloat

Single-scattering albedo as defined in

gfloat

Scattering asymmetry factor, ranges from (-1, 1).

Returns:
phase_curvePhaseCurve

Flux ratio between the reflected planetary flux and the stellar flux in units of ppm.

A_gfloat

Geometric albedo derived for the planet given {omega, g}.

qfloat

Integral phase function

temperature_map(n_theta, n_phi, f=0.7071067811865476, cython=True)[source] [edit on github]

Temperature map as a function of latitude (theta) and longitude (phi).

Parameters:
n_thetaint

Number of grid points in latitude

n_phiint

Number of grid points in longitude

ffloat

Greenhouse parameter (typically 1/sqrt(2)).

cythonbool

Use cython implementation of the hml basis. Default is True, yields a factor of ~two speedup.

Returns:
Tndarray

Temperature map evaluated precisely at each theta, phi

thetandarray

Latitudes over which temperature map is computed

phindarray

Longitudes over which temperature map is computed

thermal_phase_curve(xi, n_theta=20, n_phi=200, f=0.7071067811865476, cython=True, quad=False, check_sorted=True, _temperature_map=None)[source] [edit on github]

Compute the thermal phase curve of the system as a function of observer angle xi.

Note

The xi axis is assumed to be monotonically increasing when check_sorted=False, cython=True and quad=False.

Parameters:
xiarray-like

Orbital phase angle

n_thetaint

Number of grid points in latitude

n_phiint

Number of grid points in longitude

ffloat

Greenhouse parameter (typically 1/sqrt(2)).

cythonbool

Use Cython implementation of the integrated_blackbody function (deprecated). Default is True.

quadbool

Use dblquad to integrate the temperature map if True, else use trapezoidal approximation.

check_sortedbool

Check that the xi values are sorted before passing to cython (carefully turning this off will speed things up a bit)

Returns:
phase_curvePhaseCurve

System fluxes as a function of phase angle \(\xi\).

tilda_mu(theta)[source] [edit on github]

The normalized quantity \(\tilde{\mu} = \alpha \mu(\theta)\)

Parameters:
thetandarray

Angle \(\theta\)