Constrain the observing time to be within certain time limits.
An example use case for this class would be to associate an acceptable time range with a specific observing block. This can be useful if not all observing blocks are valid over the time limits used in calls to
Constrain the observations to targets that are observable between 2016-03-28 and 2016-03-30:
>>> from astroplan import Observer >>> from astropy.time import Time >>> subaru = Observer.at_site("Subaru") >>> t1 = Time("2016-03-28T12:00:00") >>> t2 = Time("2016-03-30T12:00:00") >>> constraint = TimeConstraint(t1,t2)
compute_constraint(times, observer, targets)
Actually do the real work of computing the constraint.
compute_constraint(times, observer, targets)¶
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.