Summarizing an off-list conversation with Raga, @geordie666, and @stephjuneau:
To get PHOTSYS from TARGETID (thanks to @geordie666):
from desitarget.io import releasedict
from desitarget.targets import decode_targetid
_, _, releases, _, _, _ = decode_targetid(targets["TARGETID"])
photsys = [releasedict[release] if release >= 9000 else None for release in releases]
This should return "N"/"S" as expected, or None if the target has no Legacy Surveys provenance (by which I mean that no valid TARGETID was propagated from dr9 for the target).
But then Raga found:
Adam's code works if the release is not equal to 11 - so, I am assuming it works for
the targets that have DR9 photometry.
Here are two targets for testing -
1. TARGETID: 39633489506601735, TILEID: 80696, RELEASE: 9011, PHOTSYS: 'N'
2. TARGETID: 39632956502838508, TILEID: 80895, RELEASE: 9011, PHOTSYS: 'N'
There is another thing that I have found in the fibermaps. In some cases, the flux_* values
are 0.0 - even when they have valid DR9 phtometry. And this is not always the case for just
secondary targets. I have seen ~10 BGS targets with FLUX_G = 0.0 - I still need to investigate
this further. From the above two targets, the first target have FLUX_G, R, Z = 0 from the FIBERMAP -
but, it has valid values in DR9 photometry.
help wanted