AirmassConstraint¶
-
class
astroplan.AirmassConstraint(max=None, min=1, boolean_constraint=True)[source]¶ Bases:
astroplan.AltitudeConstraintConstrain the airmass of a target.
In the current implementation the airmass is approximated by the secant of the zenith angle.
Note
The
maxandminarguments appear in the order (max, min) in this initializer to support the common case for users who care about the upper limit on the airmass (max) and not the lower limit.Parameters: max : float or
NoneMaximum airmass of the target.
Noneindicates no limit.min : float or
NoneMinimum airmass of the target.
Noneindicates no limit.boolean_contstraint : bool
Examples
To create a constraint that requires the airmass be “better than 2”, i.e. at a higher altitude than airmass=2:
AirmassConstraint(2)
Methods Summary
compute_constraint(times, observer, targets)Actually do the real work of computing the constraint. Methods Documentation
-
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.
-