EclipsingSystem#
- class astroplan.EclipsingSystem(primary_eclipse_time, orbital_period, duration=None, name=None, eccentricity=None, argument_of_periapsis=None)[source]#
Bases:
PeriodicEventDefine parameters for an eclipsing system; useful for an eclipsing binary or transiting exoplanet.
Warning
There are currently two major caveats in the implementation of
EclipsingSystem. The secondary eclipse time approximation is only accurate when the orbital eccentricity is small, and the eclipse times are computed without any barycentric corrections. The current implementation should only be used forapproximate mid-eclipse times for low eccentricity orbits, with event durations longer than the barycentric correction error (<=16 minutes).- Parameters:
- primary_eclipse_time
Time Time of primary eclipse
- orbital_period
Quantity Orbital period of eclipsing system
- duration
Quantity(optional) Duration of eclipse
- namestr (optional)
Name of target/event
- eccentricityfloat (optional)
Orbital eccentricity. Default is
None, which assumes circular orbit (e=0).- argument_of_periapsisfloat (optional)
Argument of periapsis for the eclipsing system, in radians. Default is
None, which assumes pi/2.
- primary_eclipse_time
Methods Summary
in_primary_eclipse(time)Returns
Truewhentimeis during a primary eclipse.in_secondary_eclipse(time)Returns
Truewhentimeis during a secondary eclipsenext_primary_eclipse_time(time[, n_eclipses])Time of the next primary eclipse after
time.next_primary_ingress_egress_time(time[, ...])Calculate the times of ingress and egress for the next
n_eclipsesprimary eclipses aftertimenext_secondary_eclipse_time(time[, n_eclipses])Time of the next secondary eclipse after
time.next_secondary_ingress_egress_time(time[, ...])Calculate the times of ingress and egress for the next
n_eclipsessecondary eclipses aftertimeout_of_eclipse(time)Returns
Truewhentimeis not during primary or secondary eclipse.Methods Documentation
- in_primary_eclipse(time)[source]#
Returns
Truewhentimeis during a primary eclipse.Warning
Barycentric offsets are ignored in the current implementation.
- Parameters:
- time
Time Time to evaluate
- time
- Returns:
- in_eclipse
ndarrayor bool Trueiftimeis during primary eclipse
- in_eclipse
- in_secondary_eclipse(time)[source]#
Returns
Truewhentimeis during a secondary eclipseIf the eccentricity of the eclipsing system is non-zero, then we compute the secondary eclipse time approximated to first order in eccentricity, as described in Winn (2010) Equation 33 [1]:
The time between the primary eclipse and secondary eclipse \(\delta t_c\) is given by \(\delta t_c \approx 0.5 \left (\frac{4}{\pi} e \cos{\omega \right)\), where \(e\) is the orbital eccentricity and \(\omega\) is the angle of periapsis.
Warning
This approximation for the secondary eclipse time is only accurate when the orbital eccentricity is small; and barycentric offsets are ignored in the current implementation.
- Parameters:
- time
Time Time to evaluate
- time
- Returns:
- in_eclipse
ndarrayor bool Trueiftimeis during secondary eclipse
- in_eclipse
References
[1]Winn (2010) https://arxiv.org/abs/1001.2010
- next_primary_eclipse_time(time, n_eclipses=1)[source]#
Time of the next primary eclipse after
time.Warning
Barycentric offsets are ignored in the current implementation.
- Parameters:
- time
Time Find the next primary eclipse after
time- n_eclipsesint (optional)
Return the times of eclipse for the next
n_eclipsesaftertime. Default is 1.
- time
- Returns:
- primary_eclipses
Time Times of the next
n_eclipsesprimary eclipses aftertime
- primary_eclipses
- next_primary_ingress_egress_time(time, n_eclipses=1)[source]#
Calculate the times of ingress and egress for the next
n_eclipsesprimary eclipses aftertimeWarning
Barycentric offsets are ignored in the current implementation.
- Parameters:
- time
Time Find the next primary ingress and egress after
time- n_eclipsesint (optional)
Return the times of eclipse for the next
n_eclipsesaftertime. Default is 1.
- time
- Returns:
- primary_eclipses
Timeof shape (n_eclipses, 2) Times of ingress and egress for the next
n_eclipsesprimary eclipses aftertime
- primary_eclipses
- next_secondary_eclipse_time(time, n_eclipses=1)[source]#
Time of the next secondary eclipse after
time.Warning
Barycentric offsets are ignored in the current implementation.
- Parameters:
- time
Time Find the next secondary eclipse after
time- n_eclipsesint (optional)
Return the times of eclipse for the next
n_eclipsesaftertime. Default is 1.
- time
- Returns:
- secondary_eclipses
Time Times of the next
n_eclipsessecondary eclipses aftertime
- secondary_eclipses
- next_secondary_ingress_egress_time(time, n_eclipses=1)[source]#
Calculate the times of ingress and egress for the next
n_eclipsessecondary eclipses aftertimeWarning
Barycentric offsets are ignored in the current implementation.
- Parameters:
- time
Time Find the next secondary ingress and egress after
time- n_eclipsesint (optional)
Return the times of eclipse for the next
n_eclipsesaftertime. Default is 1.
- time
- Returns:
- secondary_eclipses
Timeof shape (n_eclipses, 2) Times of ingress and egress for the next
n_eclipsessecondary eclipses aftertime.
- secondary_eclipses