Skip to content

Commit 9a8f1ed

Browse files
Merge pull request #56 from lsst/tickets/DM-53197
DM-53197: Preserve the ability to read older coadds
2 parents c71e9ff + 5767c8c commit 9a8f1ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/lsst/cell_coadds/_fits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ def readAsMultipleCellCoadd(self) -> MultipleCellCoadd:
296296
psf_shape=afwGeom.Quadrupole(),
297297
psf_shape_flag=True,
298298
)
299+
visit_polygons = {}
299300
if written_version >= version.parse("0.3"):
300301
visit_dict = {
301302
row["visit"]: VisitRecord(
@@ -323,7 +324,6 @@ def readAsMultipleCellCoadd(self) -> MultipleCellCoadd:
323324

324325
if written_version >= version.parse("0.6"):
325326
visit_summary_hdu = hdu_list[hdu_list.index_of("VISIT_SUMMARY")]
326-
visit_polygons = {}
327327
for row in visit_summary_hdu.data:
328328
visit = int(row["visit"])
329329
obs_id = ObservationIdentifiers(
@@ -499,7 +499,7 @@ def _readSingleCellCoadd(
499499
for mask_name, bit_value in mask_plane_dict.items():
500500
mask.array[(mask_array & 2**bit_value) > 0] |= afwImage.Mask.getPlaneBitMask(mask_name)
501501
else:
502-
mask.array[:, :] = mask
502+
mask.array[:, :] = mask_array
503503

504504
try:
505505
maskfrac = data["maskfrac"]

0 commit comments

Comments
 (0)