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:
objectPlanetary 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
- planet
Planet Planet instance which can be specified instead of the three previous parameters
- filt
Filter Filter of observations
- stellar_spectrum
StellarSpectrum 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:
- result
ndarray Hermite Polynomial evaluated at angles \(\theta\).
- result
- albedo_redist(temp_map, theta, phi)[source] [edit on github]¶
Compute the Bond albedo and heat redistribution efficiency for
temp_map.- Parameters:
- temp_map
ndarray Temperature map produced by e.g.
temperature_map.- theta
ndarray Latitudes produced by e.g.
temperature_map.- phi
ndarray Longitudes produced by e.g.
temperature_map.
- temp_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
thetaandphiare linearly spaced and always increasing.
- 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
thetais linearly spaced and always increasing.- Parameters:
- theta
ndarray Angle \(\theta\)
- 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:
- xi
ndarray 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_blackbodyfunction (deprecated). Default is True.- quadbool (default is False)
Use
dblquadto integrate the temperature map if True, else use trapezoidal approximation.- check_sortedbool (default is True)
Check that the
xivalues are sorted before passing to cython (carefully turning this off will speed things up a bit)
- xi
- Returns:
- phase_curve
PhaseCurve 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
- phase_curve
- reflected_phase_curve(xi, omega, g)[source] [edit on github]¶
Reflected light phase curve for a homogeneous sphere by Heng, Morris & Kitzmann (2021).
- Parameters:
- xi
ndarray Orbital phases of each observation defined on (-pi, pi)
- omegafloat
Single-scattering albedo as defined in
- gfloat
Scattering asymmetry factor, ranges from (-1, 1).
- xi
- Returns:
- phase_curve
PhaseCurve 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
- phase_curve
- 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:
- T
ndarray Temperature map evaluated precisely at each theta, phi
- theta
ndarray Latitudes over which temperature map is computed
- phi
ndarray Longitudes over which temperature map is computed
- T
- 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
xiaxis is assumed to be monotonically increasing whencheck_sorted=False,cython=Trueandquad=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_blackbodyfunction (deprecated). Default is True.- quadbool
Use
dblquadto integrate the temperature map if True, else use trapezoidal approximation.- check_sortedbool
Check that the
xivalues are sorted before passing to cython (carefully turning this off will speed things up a bit)
- Returns:
- phase_curve
PhaseCurve System fluxes as a function of phase angle \(\xi\).
- phase_curve
- tilda_mu(theta)[source] [edit on github]¶
The normalized quantity \(\tilde{\mu} = \alpha \mu(\theta)\)
- Parameters:
- theta
ndarray Angle \(\theta\)
- theta