High-level Expansion3D class API#
This page renders the full API of
Expansion3D from its docstrings. See
Expansion3D class overview for the conceptual tour and a quickstart,
and Analytic parameter derivatives for the gradient math when the class is used in
derivative mode.
- class meepmeep.expansion3d.Expansion3D(tc: float, p: float, a: float, i: float, e: float, w: float, lan: float = 0.0, te: float = 0.0, derivatives: bool = False, parallel: bool = False)[source]#
Bases:
objectHigh-level wrapper over the single-expansion-point 3D Taylor evaluators.
- set_pars(*, tc: float, p: float, a: float, i: float, e: float, w: float, lan: float = 0.0)[source]#
Bind orbital elements and (re-)solve the single-expansion-point Taylor coefficients.
All parameters are keyword-only, so the call site always names the elements explicitly. The expansion-point time
teis a construction-time constant and is reused on every call.- Parameters:
- tc
float Time of inferior conjunction (transit centre) [days].
- p
float Orbital period [days].
- a
float Scaled semi-major axis [R_star].
- i
float Inclination [rad].
- e
float Eccentricity.
- w
float Argument of periastron [rad].
- lan
float, optional Longitude of the ascending node [rad]. A constant rotation of the sky-plane (x, y) coordinates about the line of sight (the line-of-sight z is unaffected). Defaults to 0.0. In derivative mode the gradient w.r.t.
lanis the seventh orbital-parameter column.
- tc
Notes
After this call,
self._coeffsholds the(3, 5)coefficient matrix (andself._dcoeffsthe(7, 3, 5)derivative tensor when the instance is in derivative mode), andself._ep_timeholds the absolute time of the expansion point (tc + te).
- set_data(times)[source]#
Bind a time grid evaluated by the per-quantity methods.
- Parameters:
- times
ndarray, shape (N,) Absolute observation times [days] at which the evaluation methods (
position(),projected_separation(), …) evaluate the orbit.
- times
- position()[source]#
Planet (x, y, z) position at the times bound via
set_data().- Returns:
tuple(xs, ys, zs)if the instance was created withderivatives=False;(xs, ys, zs, dxs, dys, dzs)otherwise, where the gradients are shape(N, 7)arrays of partial derivatives with respect to(tc, p, a, i, e, w, lan).xs,ysare the sky-plane coordinates andzsthe line-of-sight depth (positive toward the observer); all in units of the stellar radius.
- z_position()[source]#
Line-of-sight (z) position at the times bound via
set_data().
- projected_separation()[source]#
Sky-projected star-planet separation at the times bound via
set_data().The sky-projected separation between the centers of the star and planet, in units of the stellar radius.
- velocity()[source]#
Planet (vx, vy, vz) velocity at the times bound via
set_data().- Returns:
tuple(vxs, vys, vzs)ifderivatives=False; otherwise(vxs, vys, vzs, dvxs, dvys, dvzs)with shape-(N, 7)gradients with respect to(tc, p, a, i, e, w, lan). Velocities are in units of stellar radii per day.
- z_velocity()[source]#
Line-of-sight (z) velocity at the times bound via
set_data().
- cos_phase()[source]#
Cosine of the orbital phase angle at the times bound via
set_data().\(\cos\alpha = -z / r\), equal to
+1at superior conjunction (full phase, planet behind the star) and-1at inferior conjunction (new phase, planet in front).
- radial_velocity(k: float)[source]#
Stellar radial velocity at the times bound via
set_data().Scales the planet’s line-of-sight velocity by the closed-form Perryman (2018, Eq. 2.23) factor so the result is the observed stellar RV.
- Parameters:
- k
float Radial-velocity semi-amplitude of the star, in physical velocity units (e.g. m/s); the output inherits these units.
- k
- Returns:
Notes
The value-path 3D radial velocity has no dedicated parallel kernel (
rvis scalar-inline and routes arrays through thezvelvector kernel), so value-mode evaluation ignores theparallelflag.
- lambert_phase_curve(ag: float, k: float)[source]#
Reflected-light (Lambertian) phase curve at the times bound via
set_data().- Parameters:
- Returns:
- ellipsoidal_variation(alpha: float, mass_ratio: float)[source]#
Ellipsoidal-variation signal at the times bound via
set_data().Relative flux variation induced by the tidally distorted primary (Lillo-Box et al. 2014). The orbital inclination is taken from the bound parameters and need not be passed.
- Parameters:
- Returns:
- emission_phase_curve(k: float, fratio: float, offset: float)[source]#
Thermal-emission (cosine model) phase curve at the times bound via
set_data().- Parameters:
- Returns:
- duration(k: float, kind: int = 14) float[source]#
Transit duration of the requested type [days].
- Parameters:
- Returns:
floatThe requested transit duration [days].