Constraint¶
-
class
astroplan.Constraint[source]¶ Bases:
objectAbstract class for objects defining observational constraints.
Methods Summary
__call__(observer, targets[, times, ...])Compute the constraint for this class compute_constraint(times, observer, targets)Actually do the real work of computing the constraint. Methods Documentation
-
__call__(observer, targets, times=None, time_range=None, time_grid_resolution=<Quantity 0.5 h>)[source]¶ Compute the constraint for this class
Parameters: observer :
Observerthe observation location from which to apply the constraints
targets : sequence of
TargetThe targets on which to apply the constraints.
times :
TimeThe times to compute the constraint. WHAT HAPPENS WHEN BOTH TIMES AND TIME_RANGE ARE SET?
time_range :
Time(length = 2)Lower and upper bounds on time sequence.
time_grid_resolution :
quantityTime-grid spacing
Returns: constraint_result : 2D array of float or bool
The constraints, with targets along the first index and times along the second.
-
compute_constraint(times, observer, targets)[source]¶ Actually do the real work of computing the constraint. Subclasses override this.
Parameters: times :
TimeThe times to compute the constraint
observer :
Observerthe observaton location from which to apply the constraints
targets : sequence of
TargetThe targets on which to apply the constraints.
Returns: constraint_result : 2D array of float or bool
The constraints, with targets along the first index and times along the second.
-