- class astroplan.PhaseConstraint(periodic_event, min=None, max=None)#
Constrain observations to times in some range of phases for a periodic event (e.g.~transiting exoplanets, eclipsing binaries).
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.
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)
compute_constraint(times[, observer, targets])
Actually do the real work of computing the constraint.
- compute_constraint(times, observer=None, targets=None)#
Actually do the real work of computing the constraint. Subclasses override this.
- constraint_result2D array of float or bool
The constraints, with targets along the first index and times along the second.