From f27c6a065bca01830d53b993eeafa273f4dd7340 Mon Sep 17 00:00:00 2001 From: Yusra AlSayyad Date: Tue, 24 Feb 2026 09:04:28 -0800 Subject: [PATCH 1/4] Ignore input images that are not requested in RGB --- python/lsst/pipe/tasks/prettyPictureMaker/_task.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/lsst/pipe/tasks/prettyPictureMaker/_task.py b/python/lsst/pipe/tasks/prettyPictureMaker/_task.py index c01f66fdf..637f47ea4 100644 --- a/python/lsst/pipe/tasks/prettyPictureMaker/_task.py +++ b/python/lsst/pipe/tasks/prettyPictureMaker/_task.py @@ -418,6 +418,9 @@ def run(self, images: Mapping[str, Exposure]) -> Struct: imageBArray = np.zeros(shape, dtype=np.float32) for band, image in channels.items(): + if band not in self.config.channelConfig: + self.log.info(f"{band} image found but not requested in RGB image, skipping") + continue mix = self.config.channelConfig[band] if mix.r: imageRArray += mix.r * image From 5187eea10a0b0fc845e103651dfd25f6ec4af2e9 Mon Sep 17 00:00:00 2001 From: Yusra AlSayyad Date: Tue, 24 Feb 2026 09:22:13 -0800 Subject: [PATCH 2/4] Remove word Task from _DefaultName --- python/lsst/pipe/tasks/prettyPictureMaker/_task.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/lsst/pipe/tasks/prettyPictureMaker/_task.py b/python/lsst/pipe/tasks/prettyPictureMaker/_task.py index 637f47ea4..7afb94cd0 100644 --- a/python/lsst/pipe/tasks/prettyPictureMaker/_task.py +++ b/python/lsst/pipe/tasks/prettyPictureMaker/_task.py @@ -274,7 +274,7 @@ def setDefaults(self): class PrettyPictureTask(PipelineTask): """Turns inputs into an RGB image.""" - _DefaultName = "prettyPictureTask" + _DefaultName = "prettyPicture" ConfigClass = PrettyPictureConfig config: ConfigClass @@ -612,7 +612,7 @@ class PrettyPictureBackgroundFixerTask(PipelineTask): """ - _DefaultName = "prettyPictureBackgroundFixerTask" + _DefaultName = "prettyPictureBackgroundFixer" ConfigClass = PrettyPictureBackgroundFixerConfig config: ConfigClass @@ -835,7 +835,7 @@ class PrettyPictureStarFixerTask(PipelineTask): bright stars for which there is no data. """ - _DefaultName = "prettyPictureStarFixerTask" + _DefaultName = "prettyPictureStarFixer" ConfigClass = PrettyPictureStarFixerConfig config: ConfigClass @@ -957,7 +957,7 @@ class PrettyMosaicConfig(PipelineTaskConfig, pipelineConnections=PrettyMosaicCon class PrettyMosaicTask(PipelineTask): """Combines multiple RGB arrays into one mosaic.""" - _DefaultName = "prettyMosaicTask" + _DefaultName = "prettyMosaic" ConfigClass = PrettyMosaicConfig config: ConfigClass From 1cbae6b7585322f40a64a6690ce12e8b39187afc Mon Sep 17 00:00:00 2001 From: Yusra AlSayyad Date: Sat, 28 Feb 2026 13:57:29 -0800 Subject: [PATCH 3/4] Use outer bbox Arrays in assemble_sub_region don't match otherwise --- python/lsst/pipe/tasks/rgb2hips/_high_order_hips.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/lsst/pipe/tasks/rgb2hips/_high_order_hips.py b/python/lsst/pipe/tasks/rgb2hips/_high_order_hips.py index 68587396b..664357fa1 100644 --- a/python/lsst/pipe/tasks/rgb2hips/_high_order_hips.py +++ b/python/lsst/pipe/tasks/rgb2hips/_high_order_hips.py @@ -428,9 +428,8 @@ def runQuantum( # All boxes in a given skymap will have the same inner dimensions # for x and y and will be the same for all patches imageWcs = skymap[tract][patch].getWcs() - box = skymap[tract][patch].getInnerBBox() + box = skymap[tract][patch].getOuterBBox() patch_grow = skymap[tract][patch].getCellInnerDimensions().getX() - box = box.dilatedBy(patch_grow) imageHandle = butlerQC.get(input_image_ref) container = inputs_by_tract.setdefault(tract, list()) container.append((imageHandle, imageWcs, box)) From 461ebddd290ee505d1ff62040409f5ec490ca679 Mon Sep 17 00:00:00 2001 From: Yusra AlSayyad Date: Sat, 28 Feb 2026 14:09:23 -0800 Subject: [PATCH 4/4] squash me check that band is in config --- python/lsst/pipe/tasks/prettyPictureMaker/_task.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/lsst/pipe/tasks/prettyPictureMaker/_task.py b/python/lsst/pipe/tasks/prettyPictureMaker/_task.py index 7afb94cd0..71a3a5be9 100644 --- a/python/lsst/pipe/tasks/prettyPictureMaker/_task.py +++ b/python/lsst/pipe/tasks/prettyPictureMaker/_task.py @@ -55,6 +55,7 @@ PipelineTaskConnections, Struct, InMemoryDatasetHandle, + NoWorkFound ) import cv2 @@ -503,6 +504,9 @@ def runQuantum( ) -> None: imageRefs: list[DatasetRef] = inputRefs.inputCoadds sortedImages = self.makeInputsFromRefs(imageRefs, butlerQC) + if not sortedImages: + requested = ', '.join(self.config.channelConfig.keys()) + raise NoWorkFound(f"No input images of band(s) {requested}") outputs = self.run(sortedImages) butlerQC.put(outputs, outputRefs) @@ -527,6 +531,9 @@ def makeInputsFromRefs( sortedImages: dict[str, Exposure] = {} for ref in refs: key: str = cast(str, ref.dataId["band"]) + if key not in self.config.channelConfig: + self.log.info(f"{key}-band image found but not requested in RGB image, skipping") + continue image = butler.get(ref) sortedImages[key] = image return sortedImages