encode/decode_negative_targetid from ra,dec #724
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides prototype code for generating a negative TARGETID based upon (ra,dec), unique to within ~1.2 milliarcsec. These are negative to distinguish them from the positive TARGETIDs generated from
encode_targetid(objid, brickid, release, ...)
from imaging surveys objects.This PR is motivated by desihub/fiberassign#335 for creating multiple sky targets on-the-fly. Currently when fiberassign creates a sky TARGETID it is based upon TILEID and positioner LOCATION, but this isn't unique if we start creating multiple sky targets per positioner, some of which will overlap other positioners. This PR provides a standardized way of generating these TARGETIDs in desitarget, which I think should "own" the concept of TARGETID rather than putting this code into fiberassign. It may also be useful for other future cases with new programs.
Discuss:
@geordie666 @dstndstn @tskisner
Note: once we converge on what we want, I'd also add some unit tests.