LogicalNotConstraint#
- class m4opt.constraints.LogicalNotConstraint(operand)[source] [edit on github]#
Bases:
ConstraintPerform a logical “not” on a constraint.
See also
Examples
>>> from astropy.coordinates import EarthLocation, SkyCoord >>> from astropy.time import Time >>> from astropy import units as u >>> from m4opt.constraints import (AtNightConstraint, LogicalNotConstraint) >>> constraint = ~AtNightConstraint.twilight_astronomical() >>> time = Time("2017-08-17T00:41:04Z") >>> target = SkyCoord.from_name("NGC 4993") >>> location = EarthLocation.of_site("Rubin Observatory") >>> constraint(location, target, time) True
Methods Summary
__call__(*args)Evaluate the constraint at a given observer location, target position, and time.
Methods Documentation
- Parameters:
operand (Constraint)
- __call__(*args)[source] [edit on github]#
Evaluate the constraint at a given observer location, target position, and time.