Closed jalasker closed 3 years ago
Can you point me to an example sv3 MTL ledger for which the code is failing? This seems to work fine in the master branch, for instance:
from desitarget import io
a = io.read_mtl_ledger("/global/cfs/cdirs/desi/target/surveyops/mtl/sv3/dark/sv3mtl-dark-hp-2850.ecsv")
[col for col in a.dtype.names if "TARGET" in col]
Out[]:
['TARGETID',
'SV3_DESI_TARGET',
'SV3_BGS_TARGET',
'SV3_MWS_TARGET',
'SV3_SCND_TARGET',
'TARGET_STATE']
Issue was with environment variables not code. Closing without merging.
While creating the code for the alternate MTLs (currently in https://github.com/desihub/LSS/tree/AltFATools/py/LSS/SV3/altmtltools), I had trouble with getting desitarget.io to read the SV3 MTLs in a way that would not cause errors involving the code later searching for "DESI_TARGET" columns rather than "SV3_DESI_TARGET" columns. This minor change appears to fix the issue.