LogicalOrConstraint#
- class m4opt.constraints.LogicalOrConstraint(*operands)[source] [edit on github]#
Bases:
LogicalReductionConstraintCombine two or more constraints using a logical “or” operation.
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, LogicalOrConstraint, SunSeparationConstraint) >>> constraint = ( ... AtNightConstraint.twilight_astronomical() | ... SunSeparationConstraint(40 * u.deg)) >>> time = Time("2017-08-17T00:41:04Z") >>> target = SkyCoord.from_name("NGC 4993") >>> location = EarthLocation.of_site("Rubin Observatory") >>> constraint(location, target, time) np.True_
- Parameters:
operands (Constraint)