# PhaseConstraint¶

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

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

Parameters: periodic_event : PeriodicEvent or subclass System on which to compute the phase. For example, the system could be an eclipsing or non-eclipsing binary, or exoplanet system. min : float (optional) Minimum phase (inclusive) on interval [0, 1). Default is zero. max : float (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])

Methods Documentation

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