SunSeparationConstraint#
- class m4opt.constraints.SunSeparationConstraint(min)[source] [edit on github]#
Bases:
BodySeparationConstraintConstrain the minimum separation from the Sun.
- Parameters:
min (Annotated[Quantity, PhysicalType('angle')]) – Minimum angular separation from the Sun.
Examples
>>> from astropy.coordinates import EarthLocation, SkyCoord >>> from astropy.time import Time >>> from astropy import units as u >>> from m4opt.constraints import SunSeparationConstraint >>> time = Time("2017-08-17T12:41:04Z") >>> target = SkyCoord.from_name("NGC 4993") >>> location = EarthLocation.of_site("Las Campanas Observatory") >>> constraint = SunSeparationConstraint(20 * u.deg) >>> constraint(location, target, time) np.True_