MoonSeparationConstraint#

class m4opt.constraints.MoonSeparationConstraint(min)[source] [edit on github]#

Bases: BodySeparationConstraint

Constrain the minimum separation from the Moon.

Parameters:

min (Annotated[Quantity, PhysicalType('angle')]) – Minimum angular separation from the Moon.

Examples

>>> from astropy.coordinates import EarthLocation, SkyCoord
>>> from astropy.time import Time
>>> from astropy import units as u
>>> from m4opt.constraints import MoonSeparationConstraint
>>> time = Time("2017-08-17T12:41:04Z")
>>> target = SkyCoord.from_name("NGC 4993")
>>> location = EarthLocation.of_site("Las Campanas Observatory")
>>> constraint = MoonSeparationConstraint(20 * u.deg)
>>> constraint(location, target, time)
np.True_