From 840bce29ecbbf293cc1ab813b573f26b9cf386a9 Mon Sep 17 00:00:00 2001 From: Dan Taranu Date: Wed, 11 Sep 2024 14:40:51 -0700 Subject: [PATCH] Fix filling of masked values in consolidated catalogs --- .../utils/_consolidate_injected_deepCoadd_catalogs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/lsst/source/injection/utils/_consolidate_injected_deepCoadd_catalogs.py b/python/lsst/source/injection/utils/_consolidate_injected_deepCoadd_catalogs.py index 2361c23..79656cf 100644 --- a/python/lsst/source/injection/utils/_consolidate_injected_deepCoadd_catalogs.py +++ b/python/lsst/source/injection/utils/_consolidate_injected_deepCoadd_catalogs.py @@ -413,9 +413,9 @@ def _make_multiband_catalog( for colname in multiband_catalog.columns: column = multiband_catalog[colname] if isinstance(column, MaskedColumn): - dtype = column.dtype - # Fill with nan if possible, otherwise the dtype's minimum - column.fill(np.nan if np.issubdtype(dtype, float) else np.ma.maximum_fill_value(column)) + column._data[column.mask] = ( + np.nan if np.issubdtype(column.dtype, float) else np.ma.maximum_fill_value(column) + ) return multiband_catalog