EclipsingSystem¶
- class rocky_worlds_data_challenge.EclipsingSystem(rprs: ArrayLike | float = None, per: ArrayLike | float = None, depth_ecl: ArrayLike | float = None, t_ecl: ArrayLike | float = None, t_tra: ArrayLike | float = None, a: ArrayLike | float = None, inc: ArrayLike | float = None, b_tra: ArrayLike | float = None, b_ecl: ArrayLike | float = None, rs: ArrayLike | float = None, omega: ArrayLike | float = None, ecc: ArrayLike | float = None, ecosw: ArrayLike | float = None, esinw: ArrayLike | float = None, secosw: ArrayLike | float = None, sesinw: ArrayLike | float = None, rho_star: ArrayLike | float = None, dur_tra: ArrayLike | float = None, dur_ecl: ArrayLike | float = None, **parameter_aliases)[source]¶
Bases:
objectInfer and validate eclipse-system parameters from posterior samples.
The class accepts several equivalent orbital parameterizations and fills in derived values such as eccentricity, impact parameters, conjunction times, durations, and stellar density where the supplied inputs make those conversions possible.
The canonical planet-to-star radius ratio parameter is
rprs. The aliasesrp_rs,rp/rs,rp/rstar,k, andradius_ratioare normalized torprs. A fractional transit depth supplied asdepth_traortransit_depthis converted torprs = sqrt(depth_tra).- Variables:
rprs (array-like or float) – Planet-to-star radius ratio.
per (array-like or float) – Orbital period in days.
depth_ecl (array-like or float) – Eclipse depth in parts per million. This value is required.
t_ecl (array-like or float) – Mid-eclipse time in BMJD_TDB.
t_tra (array-like or float) – Mid-transit time in BMJD_TDB.
a (array-like or float) – Semimajor axis in units of stellar radii.
inc (array-like or float) – Planetary orbital inclination in degrees.
b_tra (array-like or float) – Impact parameter at transit in units of stellar radii.
b_ecl (array-like or float) – Impact parameter at eclipse in units of stellar radii.
rs (array-like or float) – Stellar radius in units of solar radii.
omega (array-like or float) – Longitude of periastron in degrees.
ecc (array-like or float) – Orbital eccentricity.
ecosw (array-like or float) – Eccentricity times the cosine of longitude of periastron.
esinw (array-like or float) – Eccentricity times the sine of longitude of periastron.
secosw (array-like or float) – Square root of eccentricity times the cosine of longitude of periastron.
sesinw (array-like or float) – Square root of eccentricity times the sine of longitude of periastron.
rho_star (array-like or float) – Stellar density in units of the solar density.
dur_tra (array-like or float) – Transit duration from first through fourth contact, in days.
dur_ecl (array-like or float) – Eclipse duration from first through fourth contact, in days.
Initialize an eclipsing-system parameter set.
Parameters are the canonical dataclass fields documented above. Additional keyword arguments may include supported aliases, such as
rp_rs,k, or a fractionaltransit_depth.Attributes Summary
Semimajor axis in units of stellar radii.
Impact parameter at eclipse in units of stellar radii.
Impact parameter at transit in units of stellar radii.
Eclipse depth in parts per million.
Eclipse duration from first through fourth contact, in days.
Transit duration from first through fourth contact, in days.
Orbital eccentricity.
Eccentricity times the cosine of longitude of periastron.
Eccentricity times the sine of longitude of periastron.
Planetary orbital inclination in degrees.
Longitude of periastron in degrees.
Orbital period in days.
Stellar density in units of the solar density.
Planet-to-star radius ratio.
Stellar radius in units of solar radii.
Square root of eccentricity times cosine of longitude of periastron.
Square root of eccentricity times sine of longitude of periastron.
Mid-eclipse time in BMJD_TDB.
Mid-transit time in BMJD_TDB.
Methods Summary
from_posteriors(samples, parameter_keys)Build an eclipsing system from one posterior draw and its keys.
Return semimajor axis in stellar radii and inclination.
get_b()Return the transit and eclipse impact parameters.
Return the mid-transit and mid-eclipse times.
Return first-to-fourth-contact transit and eclipse durations.
Return eccentricity and longitude of periastron.
validate()Check required inputs and derive all supported dependent values.
Attributes Documentation
- a: ArrayLike | float¶
Semimajor axis in units of stellar radii.
- b_ecl: ArrayLike | float¶
Impact parameter at eclipse in units of stellar radii.
- b_tra: ArrayLike | float¶
Impact parameter at transit in units of stellar radii.
- depth_ecl: ArrayLike | float¶
Eclipse depth in parts per million.
- dur_ecl: ArrayLike | float¶
Eclipse duration from first through fourth contact, in days.
- dur_tra: ArrayLike | float¶
Transit duration from first through fourth contact, in days.
- ecc: ArrayLike | float¶
Orbital eccentricity.
- ecosw: ArrayLike | float¶
Eccentricity times the cosine of longitude of periastron.
- esinw: ArrayLike | float¶
Eccentricity times the sine of longitude of periastron.
- inc: ArrayLike | float¶
Planetary orbital inclination in degrees.
- omega: ArrayLike | float¶
Longitude of periastron in degrees.
- per: ArrayLike | float¶
Orbital period in days.
- rho_star: ArrayLike | float¶
Stellar density in units of the solar density.
- rprs: ArrayLike | float¶
Planet-to-star radius ratio.
- rs: ArrayLike | float¶
Stellar radius in units of solar radii.
- secosw: ArrayLike | float¶
Square root of eccentricity times cosine of longitude of periastron.
- sesinw: ArrayLike | float¶
Square root of eccentricity times sine of longitude of periastron.
- t_ecl: ArrayLike | float¶
Mid-eclipse time in BMJD_TDB.
- t_tra: ArrayLike | float¶
Mid-transit time in BMJD_TDB.
Methods Documentation
- classmethod from_posteriors(samples, parameter_keys)[source]¶
Build an eclipsing system from one posterior draw and its keys.
- Parameters:
samples (array-like) – One posterior draw containing one value for each parameter.
parameter_keys (array-like) – Parameter names corresponding to
samples.
- Returns:
System initialized with the supplied posterior values.
- Return type:
- get_a_inc()[source]¶
Return semimajor axis in stellar radii and inclination.
The inclination is returned in degrees.
- Returns:
a (array-like or float) – Semimajor axis in units of stellar radii.
inc (array-like or float) – Orbital inclination in degrees.
- get_b()[source]¶
Return the transit and eclipse impact parameters.
- Returns:
b_tra (array-like or float) – Transit impact parameter in units of stellar radii.
b_ecl (array-like or float) – Eclipse impact parameter in units of stellar radii.
- get_conjunction_times()[source]¶
Return the mid-transit and mid-eclipse times.
- Returns:
t_tra (array-like or float) – Mid-transit time in BMJD_TDB.
t_ecl (array-like or float) – Mid-eclipse time in BMJD_TDB.
- get_durations()[source]¶
Return first-to-fourth-contact transit and eclipse durations.
- Returns:
dur_tra (array-like or float) – Transit duration in days.
dur_ecl (array-like or float) – Eclipse duration in days.
- get_ecc_omega()[source]¶
Return eccentricity and longitude of periastron.
The method accepts any one of three equivalent parameterizations:
ecc/omega,ecosw/esinw, orsecosw/sesinw. Missing companion eccentricity parameters are filled in place when possible.- Returns:
ecc (array-like or float) – Orbital eccentricity.
omega (array-like or float) – Longitude of periastron in degrees.
- Raises:
ValueError – If no supported eccentricity/orientation parameterization has been provided.