High-level Expansion2D class API#
This page renders the full API of
Expansion2D from its docstrings. See
Expansion2D 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.expansion2d.Expansion2D(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 2D 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. 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(2, 5)coefficient matrix (andself._dcoeffsthe(7, 2, 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 position / separation methods.
- Parameters:
- times
ndarray, shape (N,) Absolute observation times [days] at which
position()andprojected_separation()evaluate the orbit.
- times
- position()[source]#
Sky-plane (x, y) position at the times bound via
set_data().- Returns:
tuple(xs, ys)if the instance was created withderivatives=False;(xs, ys, dxs, dys)otherwise, wheredxsanddysare shape(N, 7)arrays of partial derivatives with respect to(tc, p, a, i, e, w, lan). All positions are in units of the stellar radius.
- 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.
- duration(k: float, kind: int = 14) float[source]#
Transit duration of the requested type [days].
- Parameters:
- Returns:
floatThe requested transit duration [days].