-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPSIM-1175: update the kinematic model and altazshadowmask basis function #88
Conversation
I think what's happening with this failure is that the long gaps survey is requesting an out of bounds scripted survey observation. The scripted survey isn't fully checking against the alt/az limits as it's currently set up in the baseline. |
dd539c5
to
cd1c448
Compare
This problem was indeed fixed when previous PRs added the AltAzShadowMask to the scripted survey and cleaned up the note handling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The motivation for refactoring alt/az limits is kind of mysterious. There's not a bug being patched, there's not a performance boost to be had, there's no new functionality being added (and some potentially lost).
If we want to be able to communicate limited telescope functionality to the scheduler, I would just put that information into the Conditions
object and have a basis function that is dedicated to interpreting it and generating the correct mask. There's no need to overload the slew time map.
rubin_scheduler/scheduler/model_observatory/model_observatory.py
Outdated
Show resolved
Hide resolved
19df48b
to
4199c9a
Compare
Summarizing a live conversation about AltAzShadowMask:
I had tried to get the limitations from the telescope passed as part of the limitations from the telescope configuration - kinematic model, in this case, or observatory model in operations, and figured these were both constraints about physical limitations for the mount (as in, you couldn't even pass through these regions). So we have:
I think this means the kinematic model updates remain the same, the AltAzShadowMaskBasisFunction needs updates, and the way the ModelObservatory passes values to the Conditions (and then the AltAzShadowMaskBasisFunction) needs updates (probably update to something similar to what the previous handling was?). |
4199c9a
to
4933121
Compare
…onditions objects. Now will use most restrictive of either keyword or conditions values (so default conditions are widely set).
Modify use of filters within kinematic model (slewtime can be calculated in any filter, filter will be set to one of allowable filters when parked). Conditions object gets azimuth limits from azimuth limits of model. AltAzShadowMaskBasisFunction adds padding for azimuth limits from telescope model. RotSkyPos values out of range are only masked in the parts of the sky where they are out of range. Add dictionary of tma/rotator values that can be set via “percent of max performance”.
Squashed commits: [4611e38] Update unit test parameters and error message, plus comments
…avoid trajectory errors.
isort (+1 squashed commit) Squashed commits: [dd539c5] Mark alternative zenith or azimuth masks as to be deprecated.
Keeps previous capability of allowing disjoint altitude or azimuth regions, while also respecting kinematic model constraints Added more extensive unit test
… more robust against similar issues.
…de them. Keith expects to modify this over the course of commissioning, and that the field centers may not align with full LSSTCam field centers anyway, so hard-coded is likely easier to see and track.
eadbded
to
4e891a6
Compare
After the changes, there are basically discontiguous areas which are (optionally) passed from the observatory model. The AltAzBasisFunction will also pick up limits from the telescope model automatically (which currently isn't a problem in our standard simulations, as we don't degrade the telescope performance .. but might be more of an issue as we evaluate commissioning or early science surveys where the altitude range in particular will be limited). The kinematic model is more thoroughly separated from this than previously, in that it doesn't even carry the optional limits now. The slewtime calculation has been updated so that it is possible to calculate slew times with a compromised azimuth range though (previously the kinematic model would return infinite slew times over the whole sky if the available azimuth range was less than 360 degrees). There is much more extensive testing of the AltAzShadowMask and some other basis functions. |
The problem that this PR addresses is to make it easier to avoid choosing pointings that are in inaccessible regions, without having to set alt/az limits carefully for each survey -- as well as letting them be updated easily via the conditions object using If a survey is configured with an AltAzShadowMaskBasisFunction, it will then pick up these restrictions automatically and use these to mask parts of the sky which should be inaccessible. The AltAzShadowMask adds The screenshots below show a simple greedy survey configured with and without the AltAzShadowMask basis function, which would get the kinematic limits of the telescope (here unrestricted, just normal altitude limits). The background healpix map is the slewtime map - gray areas are out of bounds. The red dots are the pointing centers which the reward map would include as valid field centers. The first is without the AltAzShadowMaskBasisFunction and the second is with the AltAzShadowMaskBasisFunction. The differences are subtle, but can be seen at the high altitude limits near zenith (note there is also a 'shadow_minutes' set which extends the high-altitude mask into the area which is soon to be in the zenith avoidance region). |
The differences seen in the final unit test which is failing seem to be minor. The difference lies in whether or not the With the previous PR indicated as not a significant change, I'm inclined to simply remove the requirement for having |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine on a 5-year run.
I expect this PR could have downstream effects on what is scheduled .. depending on how the observatory kinematic model is set up.
For a fully functioning telescope, with >360 degrees of rotator azimuth range, I don't think it would have that much of an effect. However, it's also true that if we're bumping up against the cumulative azimuth range, this might be an incorrect statement. Depends on the configuration of the AltAzShadowMaskBasisFunction itself during use.
The kinematic model will now return valid slew times over the parts of the sky which are valid, if provided "no filter" or if given rotSkyPos. This again should have no effect on the actual operations of the kinematic model during baseline sim_runner use, but is useful when trying to diagnose issues later or to just investigate possible slew times.