TimeConstraint¶
- class astroplan.TimeConstraint(min=None, max=None)[source]¶
Bases:
Constraint
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
is_observable
oris_always_observable
.- Parameters
- min
Time
Earliest time (inclusive).
None
indicates no limit.- max
Time
Latest time (inclusive).
None
indicates no limit.
- min
Examples
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)
Methods Summary
compute_constraint
(times, observer, targets)Actually do the real work of computing the constraint.
Methods Documentation