From 8d7d7aacd61c9f6a97525854d000d553f376ca5c Mon Sep 17 00:00:00 2001 From: Brett Graham Date: Tue, 13 Aug 2024 07:55:12 -0400 Subject: [PATCH] fix number of context planes (#1355) Co-authored-by: Eddie Schlafly --- CHANGES.rst | 5 +++++ romancal/resample/resample.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c67a3af23..c46f197ce 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -61,6 +61,11 @@ tweakreg -------- - Integration with ``SourceCatalogStep``: allow usage of results from ``SourceCatalogStep``. [#1276] +resample +-------- + +- Fix incorrect number of starting planes for context image. [#1355] + mosaic_pipeline --------------- diff --git a/romancal/resample/resample.py b/romancal/resample/resample.py index eedfc025b..ca6363f1d 100644 --- a/romancal/resample/resample.py +++ b/romancal/resample/resample.py @@ -153,8 +153,10 @@ def __init__( # NOTE: wait for William to fix bug in datamodels' init and then # use datamodels.ImageModel(shape=(nx, ny)) instead of mk_datamodel() + # n_images sets the number of context image planes. + # This should be 1 to start (not the default of 2). self.blank_output = maker_utils.mk_datamodel( - datamodels.MosaicModel, shape=tuple(self.output_wcs.array_shape) + datamodels.MosaicModel, n_images=1, shape=tuple(self.output_wcs.array_shape) ) with self.input_models: