PhaseConstraint

class astroplan.PhaseConstraint(periodic_event, min=None, max=None)[source]

Bases: Constraint

Constrain observations to times in some range of phases for a periodic event (e.g.~transiting exoplanets, eclipsing binaries).

Parameters
periodic_eventPeriodicEvent or subclass

System on which to compute the phase. For example, the system could be an eclipsing or non-eclipsing binary, or exoplanet system.

minfloat (optional)

Minimum phase (inclusive) on interval [0, 1). Default is zero.

maxfloat (optional)

Maximum phase (inclusive) on interval [0, 1). Default is one.

Examples

To constrain observations on orbital phases between 0.4 and 0.6, >>> from astroplan import PeriodicEvent >>> from astropy.time import Time >>> import astropy.units as u >>> binary = PeriodicEvent(epoch=Time(‘2017-01-01 02:00’), period=1*u.day) >>> constraint = PhaseConstraint(binary, min=0.4, max=0.6)

The minimum and maximum phase must be described on the interval [0, 1). To constrain observations on orbital phases between 0.6 and 1.2, for example, you should subtract one from the second number: >>> constraint = PhaseConstraint(binary, min=0.6, max=0.2)

Methods Summary

compute_constraint(times[, observer, targets])

Actually do the real work of computing the constraint.

Methods Documentation

compute_constraint(times, observer=None, targets=None)[source]

Actually do the real work of computing the constraint. Subclasses override this.

Parameters
timesTime

The times to compute the constraint

observerObserver

the observaton location from which to apply the constraints

targetssequence of Target

The targets on which to apply the constraints.

Returns
constraint_result2D array of float or bool

The constraints, with targets along the first index and times along the second.