desihub / desisurvey

Code for desi survey planning and implementation
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

Add option removing the gray layer #130

Closed schlafly closed 3 years ago

schlafly commented 3 years ago

This PR adds the option of calling gray time dark time, and treating the gray layer as just another dark layer. The mechanism is to optionally in the surveyinit script add the gray time to the dark time and set the gray time to zero, and if that is set, merge the gray tile list with the dark tile list. Then there is code in desisurvey.tiles to dynamically rename the gray tiles to dark tiles.

That's a little clunky, but I didn't want to go through the pain of changing desimodel's tiles at this point; we're going to have a new set of tiles soon anyway.

I also didn't want to remove the notion of 'gray' from the ephemerides option, since that presently controls the sky brightness, which it seems like should still exist.

There are a lot of knock on changes throughout the code base in places where GRAY was expected as an option.

To implement the SV completeness definition where a tile must be observed in multiple different moon conditions, surveyinit became more complicated to allow tiles to to have different HA optimizations for different conditions. As part of working on that to handle the "nogray" option, I realized that refactoring most of the internal state out of the scheduler and into the planner would remove some code duplication. So that change got added in as well.

This has a tiny effect on the tiles that actually get chosen even if config.tiles_nogray = False, because I changed the mechanism by which the program was selected slightly. In the past I selected the program suitable for the next set of conditions if the next set of conditions started within half a nominal exposure time. But I didn't want to set up a nogray option to look up the appropriate DARK tiles in gray time, especially given that we'll be changing the program selection to be survey speed related shortly. So now it's just based on the conditions 5 min in the future.

surveysim also needs a bunch of related changes to accommodate these changes; that's an associated PR.

Now I need to add in the "nopass" option. That will be another large-ish PR touching both desisurvey and surveysim. I'll probably try to merge this this weekend, if @dkirkby wants to review. Thanks!

schlafly commented 3 years ago

I've added a bunch of new stuff to this PR, primarily adding nopass mode, and also incorporating some of the initial data model changes to accommodate the new tile file structure DavidS proposes here: https://desi.lbl.gov/trac/wiki/SurveyOps/DailyOps though much more work is needed there.