desihub / desitarget

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

Add function to match RA/Dec positions to Main Survey targets #820

Closed geordie666 closed 4 months ago

geordie666 commented 4 months ago

This PR adds a function to match RA/Dec positions to Main Survey targets (desitarget.secondary.match_to_main_survey()).

The purpose of this function is to provide a straightforward way for proposers of spare-fiber programs to check how many of their likely targets already match main-survey targets.

geordie666 commented 4 months ago

This PR adds a standalone function with no other dependencies so should be uncontroversial. I'll merge it soon in preparation for an impending call for new spare-fiber targets.

moustakas commented 4 months ago

Nice. Quick comment to consider: Would it be useful to add the targeting columns (DESI_TARGET, BGS_TARGET, etc.) as well as TARGETID (for matches) so the user can understand why an object was targeted in the main survey?

geordie666 commented 4 months ago

Yep, good idea. I'll add those.

geordie666 commented 4 months ago

I've added the TARGETIDs to the output file. I didn't add the other columns @moustakas suggested: The issue is that all of the _TARGET columns can be different for each of the dark, bright, secondary/dark, secondary/bright combinations, so the extra information in the file quickly proliferates.

Users interested in provenance should be able to use the TARGETIDs to look up extra information.