Skip to content

v3.2.0

Latest

Choose a tag to compare

@fabianschussler fabianschussler released this 25 Nov 15:00
95fc3ce

New

  • Optional user-defined observability constraints, on top of the built-in visibility cuts. A constraint is any astroplan Constraint (built-in or your own subclass) or a function f(time, coords, obspar). Attach them with obspar.userConstraints = [...] or with userConstraints = my_cuts.py:cuts in the [visibility] section of the configuration file. At each time step, candidate pointings that fail a constraint are discarded and the best remaining one is scheduled. Ground-based observatories, 2D and 3D, single and multi-observatory. See the new "User-defined constraints" page of the user manual. (#147, #161)

Fixes

  • Time steps at which no candidate pointing is left no longer make a schedule fail. (#161)
    • Multi-observatory 2D: the second round failed whenever it was reached (wrong arguments).
    • Multi-observatory 3D: IndexError when no galaxy passed the cuts.
    • Second rounds of the 3D schedulers fall back to the first round when they have no candidate.
  • 3D with useGreytime: when no galaxy passed the zenith cut, the most probable galaxy was scheduled anyway. The time step is now skipped. (#161)

API changes

  • FulfillsRequirement(theseGals, obspar, UsePix, time=None): new optional time argument; it always returns a boolean mask. (#161)
  • New EvaluateUserConstraints and LoadUserConstraints; new userConstraints argument and attribute of ObservationParameters. (#161)

Maintenance

  • New tests for the constraints, including 3D schedules on the synthetic map. Pre-commit hooks updated. (#160, #161)

Note: schedules are unchanged when no constraint is defined, except in the grey-time case fixed above. The userConstraints configuration key imports and runs the python file it names: only use configuration files you trust. User-defined constraints are not applied to space-based observatories, nor to the observation windows of the ranking.