desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
18 stars 23 forks source link

Ensure io.read_targets_in_hp() always returns targets in a reproducible order #806

Closed geordie666 closed 12 months ago

geordie666 commented 12 months ago

Anand noticed that a small number of skies could have discrepant TARGETIDs in different realizations of the sky location files produced by versions 1.1.0 and 1.1.1 of the desitarget code. This was caused by a somewhat convoluted bug:

This PR resolves this bug by sorting the problematic set.

This PR is likely to be non-controversial. Sorting the set will potentially change the order of output targets/masks, but these were unordered anyway. I'll merge in a few days.