astro plan:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroplan v0.7 »
- Reference/API »
- MoonIlluminationConstraint

# MoonIlluminationConstraint

class `astroplan.``MoonIlluminationConstraint`(min=None, max=None, ephemeris=None)

  Bases: `astroplan.Constraint`

  Constrain the fractional illumination of the Earth’s moon.

  Constraint is also satisfied if the Moon has set.

  Parameters
    min float or `None` (optional)

      Minimum acceptable fractional illumination (inclusive). `None` indicates no limit.

    max float or `None` (optional)

      Maximum acceptable fractional illumination (inclusive). `None` indicates no limit.

    ephemeris str, optional

      Ephemeris to use. If not given, use the one set with `solar_system_ephemeris` (which is set to ‘builtin’ by default).

  Methods Summary

  `bright`([min, max]) | initialize a `MoonIlluminationConstraint` with defaults of a minimum of 0.65 and no maximum
  `compute_constraint`(times, observer, targets) | Actually do the real work of computing the constraint.
  `dark`([min, max]) | initialize a `MoonIlluminationConstraint` with defaults of no minimum and a maximum of 0.25
  `grey`([min, max]) | initialize a `MoonIlluminationConstraint` with defaults of a minimum of 0.25 and a maximum of 0.65

  Methods Documentation

  classmethod `bright`(min=0.65, max=None, **kwargs)

    initialize a `MoonIlluminationConstraint` with defaults of a minimum of 0.65 and no maximum

    Parameters
      min float or `None` (optional)

        Minimum acceptable fractional illumination (inclusive). `None` indicates no limit.

      max float or `None` (optional)

        Maximum acceptable fractional illumination (inclusive). `None` indicates no limit.

  `compute_constraint`(times, observer, targets)

    Actually do the real work of computing the constraint. Subclasses override this.

    Parameters
      times `Time`

        The times to compute the constraint

      observer `Observer`

        the observaton location from which to apply the constraints

      targets sequence of `Target`

        The 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.

  classmethod `dark`(min=None, max=0.25, **kwargs)

    initialize a `MoonIlluminationConstraint` with defaults of no minimum and a maximum of 0.25

    Parameters
      min float or `None` (optional)

        Minimum acceptable fractional illumination (inclusive). `None` indicates no limit.

      max float or `None` (optional)

        Maximum acceptable fractional illumination (inclusive). `None` indicates no limit.

  classmethod `grey`(min=0.25, max=0.65, **kwargs)

    initialize a `MoonIlluminationConstraint` with defaults of a minimum of 0.25 and a maximum of 0.65

    Parameters
      min float or `None` (optional)

        Minimum acceptable fractional illumination (inclusive). `None` indicates no limit.

      max float or `None` (optional)

        Maximum acceptable fractional illumination (inclusive). `None` indicates no limit.