gemini-hlsw/ocs — pull request #85 by swalker2m (2014-11-10 18:52:45+00:00)
Title: OCSADV-178: updates to default guiding strategy and an explicit "auto" mode

Due to (my own) shortsighted decision making during the AGS refactoring we have an issue. In particular, all the AGS improvements we have done depend upon knowing which strategy should be applied for finding guide stars. For example, analyzing or selecting an F2 OI guide star for use as a flexure star with GeMS is different than analyzing or selecting one in a non-AO context. While we can come up with a suggested strategy to use for any context, there are always multiple options. I thought it would be sufficient to just store the selected strategy in the observation and be done with it. Unfortunately that’s not the case since adjustments to the observation can cause the list of valid strategies to change or even make a selected strategy illegal. Then the user has to adjust the AGS strategy choice in the target component to fix the problem. Worse still we are only storing the selected strategy when it differs from the calculated best strategy, and yet the calculated best can change as the observation configuration changes.

The change introduced by this PR is a familiar, if grim one. Andy has not only approved but has tested an initial version for what it is worth, but this is all pretty awful so I’m open to other alternatives. In a nutshell, this update would:

* Make the default AGS option be an automatically calculated one that takes into account the already assigned guide stars along with the rest of the observation configuration. For example ordinarily a non-AO F2 observation would use the OIWFS but if you have selected a P2 guide star, you don’t want to see an error about missing F2 OI. See `AgsRegistrar` for the update to the default strategy calculation.
* Offer an “override” option in which a guide strategy is explicitly selected. If you go for an explicitly selected strategy you’re signing up to change it as necessary later.

Amongst the sketchiest of the changes are the `AgsContext` and `AgsContextPublisher` employed by the TPE and telescope position editor component to keep track of the current AGS strategy and valid options as an observation changes.