Closed geordie666 closed 3 years ago
@araichoor: I think you can switch your bespoke code in fba_launch_io.py over to just two lines of code using the following schema:
targets=io.read_targets_in_tiles(hpdirname, tiles=tiles, quick=True)
or by directly using targets=io.read_targets_in_tiles_quick(hpdirname, tiles=tiles)
mtl.inflate_ledger()
, which is mtl_with_target_columns = mtl.match_ledger_to_targets(mtl, targets)
.You might also want to just try mtl_with_target_columns = mtl.inflate_ledger(mtl, targdir, quick=True)
directly, as there doesn't appear to be a huge speed-up from switching to using io.read_targets_in_tiles_quick()
.
It would be great if you could try this set-up for some pass 0 tiles and check that results are identical and (hopefully) faster than the standard desitarget.io
routines.
This PR fixes a bug when reading MTL ledgers. It also implements some speed-ups in the functions that read targets, which were suggested by @araichoor. To summarize:
1.0.0
of desitarget (see also PR #742). The quick-fix that was implemented to address this issue broke the reader for SV targets (see issue #749). This PR implements a less fragile fix that facilitates reading all types of MTL ledgers, including SV3 and Main Survey1.0.0
.io.read_targets_in_tiles()
via a newio.read_targets_in_tiles_quick()
function.mtl.inflate_ledger()
using a newmtl.match_ledger_to_targets()
function.