Skip to content

Commit

Permalink
Fix zip-iteration over cells.
Browse files Browse the repository at this point in the history
MultipleCellCoadd isn't iterable, but its .cells attribute is a
mapping.
  • Loading branch information
TallJimbo committed Aug 25, 2023
1 parent 300b27b commit a25beb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/drp/tasks/metadetection_shear.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ def run(self, patch_coadds: Sequence[MultipleCellCoadd]) -> Struct:
catalog for the patch, with schema equal to `object_schema`.
"""
single_cell_tables: list[pa.Table] = []
for single_cell_coadds in zip(*patch_coadds, strict=True):
for single_cell_coadds in zip(
*[patch_coadd.cells.values() for patch_coadd in patch_coadds], strict=True
):
single_cell_tables.append(self.process_cell(single_cell_coadds))
# TODO: if we need to do any cell-overlap-region deduplication here
# (instead of purely in science analysis code), this is where'd it'd
Expand Down

0 comments on commit a25beb1

Please sign in to comment.