This PR replaces #736 which I will close after submitting this.
This provides tools for overriding SUBPRIORITY when generating target files, to work around the accidental SUBPRIORITY reassignments from fiberassign in May 2021:
desitarget.subpriority.override_subpriority(targets, override) - override targets['SUBPRIORITY'] in-place, for those TARGETIDs that appear in the override table.
desitarget.subpriority.get_fiberassign_subpriorities used to scrape fiberassign TARGETS HDUs to build override lists for dark, bright, and sky.
examples in /global/cscratch1/sd/sjbailey/desi/targets/subpriorities*.fits
this can be called from the command line but purposefully isn't put into the default desitarget installation path, e.g.
select_targets --dark-subpriorities ... --bright-subpriorities ... options to provide override lists
select_skies --sky-subpriorities ... and supplement_skies --sky-subpriorities subpriorities-sky.fits options to provide sky SUBPRIORITY override lists
more unit tests related to subpriority overrides and writing files
One change of behavior in write_targets et al:
subpriority=True means set any SUBPRIORITY==0.0, but leave any SUBPRIOITY>0.0 alone (different than current master which overrides all or nothing)
if you really want to override all, set input SUBPRIORITY==0.0 before calling write_targets(..., subpriority=True).
Examples in /global/cscratch1/sd/sjbailey/desi/targets/default and override/. I believe I have tested the following but would appreciate additional checks:
targets appear in the same order regardless of override options
targets that differ in SUBPRIORITY are in the override list
targets with the same SUBPRIORITY are not in the override list
TARGETIDs in the override list have the SUBPRIORITIES from that list
Coverage decreased (-0.04%) to 58.939% when pulling 7715f8b4be741d70a697835dc9ac11eaf6bbe81d on subpriority2 into b2b3f21d1bd8ab03569b3225cd95de719583a552 on master.
This PR replaces #736 which I will close after submitting this.
This provides tools for overriding SUBPRIORITY when generating target files, to work around the accidental SUBPRIORITY reassignments from fiberassign in May 2021:
desitarget.subpriority.override_subpriority(targets, override)
- override targets['SUBPRIORITY'] in-place, for those TARGETIDs that appear in the override table.desitarget.subpriority.get_fiberassign_subpriorities
used to scrape fiberassign TARGETS HDUs to build override lists for dark, bright, and sky.select_targets --dark-subpriorities ... --bright-subpriorities ...
options to provide override listsselect_skies --sky-subpriorities ...
andsupplement_skies --sky-subpriorities subpriorities-sky.fits
options to provide sky SUBPRIORITY override listsOne change of behavior in
write_targets
et al:write_targets(..., subpriority=True)
.Examples in
/global/cscratch1/sd/sjbailey/desi/targets/default
andoverride/
. I believe I have tested the following but would appreciate additional checks:@araichoor @geordie666