From 0b9a48cda5f1b98be53e771d5216caf8b403866b Mon Sep 17 00:00:00 2001 From: Erin Howard Date: Wed, 5 Aug 2026 21:52:10 -0700 Subject: [PATCH 1/2] Update Prompt & QuickTemplate for incremental templates --- bps/clustering/clustering_PromptTemplate.yaml | 3 + bps/clustering/clustering_QuickTemplate.yaml | 15 ++++- pipelines/LSSTCam/PromptTemplate.yaml | 45 ++------------- pipelines/_ingredients/QuickTemplate.yaml | 55 +++++++++++++++---- 4 files changed, 64 insertions(+), 54 deletions(-) diff --git a/bps/clustering/clustering_PromptTemplate.yaml b/bps/clustering/clustering_PromptTemplate.yaml index e59ca39c..d57e651b 100644 --- a/bps/clustering/clustering_PromptTemplate.yaml +++ b/bps/clustering/clustering_PromptTemplate.yaml @@ -26,3 +26,6 @@ cluster: make_tract_analysis_images: pipetasks: makeWholeTractTemplateCoaddNImage,makeWholeTractTemplateCoaddImage dimensions: tract,band + make_metrics: + pipetasks: analyzeCoaddDepthCore,coaddDepthMetricTract + dimensions: tract diff --git a/bps/clustering/clustering_QuickTemplate.yaml b/bps/clustering/clustering_QuickTemplate.yaml index dab98d28..194ae850 100644 --- a/bps/clustering/clustering_QuickTemplate.yaml +++ b/bps/clustering/clustering_QuickTemplate.yaml @@ -19,8 +19,17 @@ cluster: pipetasks: consolidateVisitSummary dimensions: visit makeWarp: - pipetasks: makeWarp - dimensions: tract,patch,visit + pipetasks: makeDirectWarp,makePsfMatchedWarp + dimensions: patch,visit selectAndAssemble: - pipetasks: selectGoodSeeingVisits,assembleCoadd + pipetasks: selectTemplateCoaddVisits,assembleTemplateCoadd dimensions: band,tract,patch + make_analysis_images: + pipetasks: makeBinnedTemplateCoaddNImage,makeBinnedTemplateCoaddImage + dimensions: tract,band + make_tract_analysis_images: + pipetasks: makeWholeTractTemplateCoaddNImage,makeWholeTractTemplateCoaddImage + dimensions: tract,band + make_metrics: + pipetasks: analyzeCoaddDepthCore,coaddDepthMetricTract + dimensions: tract diff --git a/pipelines/LSSTCam/PromptTemplate.yaml b/pipelines/LSSTCam/PromptTemplate.yaml index cc6dc6e1..439d519e 100644 --- a/pipelines/LSSTCam/PromptTemplate.yaml +++ b/pipelines/LSSTCam/PromptTemplate.yaml @@ -4,33 +4,20 @@ description: The LSSTCam AP template building pipeline with preliminary_visit_im instrument: lsst.obs.lsst.LsstCam imports: -- location: $DRP_PIPE_DIR/pipelines/_ingredients/base-v2.yaml - include: - - consolidateVisitSummary +- location: $AP_PIPE_DIR/pipelines/_ingredients/QuickTemplate.yaml + exclude: + - isr + - calibrateImage - selectTemplateCoaddVisits - - makeDirectWarp - - makePsfMatchedWarp - - assembleTemplateCoadd - - makeBinnedTemplateCoaddImage - - makeBinnedTemplateCoaddNImage - - makeWholeTractTemplateCoaddImage - - makeWholeTractTemplateCoaddNImage -- location: $ANALYSIS_TOOLS_DIR/pipelines/coaddDepthMetrics.yaml - include: - - analyzeCoaddDepthCore - - coaddDepthMetricTract tasks: consolidateVisitSummary: class: lsst.pipe.tasks.postprocess.ConsolidateVisitSummaryTask config: full: True - makeDirectWarp: - class: lsst.drp.tasks.make_direct_warp.MakeDirectWarpTask - config: - connections.visit_summary: preliminary_visit_summary - useVisitSummaryPsf: False selectTemplateCoaddVisits: + # Class changed from BestSeeingQuantileSelectVisitsTask due to different template + # expectations for incremental templates. class: lsst.pipe.tasks.selectImages.BestSeeingSelectVisitsTask config: connections.visitSummaries: preliminary_visit_summary @@ -38,23 +25,3 @@ tasks: maxPsfFwhm: 1.4 python: | config.visitSummaryMinValues = {'effTimeZeroPointScale': 0.75} - -subsets: - makeTemplate: - subset: - - selectTemplateCoaddVisits - - makeDirectWarp - - makePsfMatchedWarp - - assembleTemplateCoadd - description: > - Tasks to run to build template_coadds. - makeMetrics: - subset: - - makeBinnedTemplateCoaddImage - - makeBinnedTemplateCoaddNImage - - makeWholeTractTemplateCoaddImage - - makeWholeTractTemplateCoaddNImage - - analyzeCoaddDepthCore - - coaddDepthMetricTract - description: > - Metrics and plots to run on the template_coadds. diff --git a/pipelines/_ingredients/QuickTemplate.yaml b/pipelines/_ingredients/QuickTemplate.yaml index 76cb1ed6..768e7c36 100644 --- a/pipelines/_ingredients/QuickTemplate.yaml +++ b/pipelines/_ingredients/QuickTemplate.yaml @@ -6,10 +6,23 @@ imports: - isr - calibrateImage - consolidateVisitSummary - - selectDeepCoaddVisits + - selectTemplateCoaddVisits - makeDirectWarp - makePsfMatchedWarp - assembleTemplateCoadd + - makeTemplateCoaddInputSummaryTract + - makeTemplateCoaddInputSummary + - makeBinnedTemplateCoaddImage + - makeBinnedTemplateCoaddNImage + - makeWholeTractTemplateCoaddImage + - makeWholeTractTemplateCoaddNImage + - aggregateTemplateCoaddMaskFractions + - makeAggregatedTemplateCoaddMaskFractionsTable + - aggregatedTemplateCoaddMaskFractionsWholeSkyPlot +- location: $ANALYSIS_TOOLS_DIR/pipelines/coaddDepthMetrics.yaml + include: + - analyzeCoaddDepthCore + - coaddDepthMetricTract tasks: calibrateImage: @@ -25,35 +38,53 @@ tasks: # take many 10s of seconds in crowded fields do_remeasure_star_background: False doMaskDiffractionSpikes: True - selectDeepCoaddVisits: - class: lsst.pipe.tasks.selectImages.BestSeeingSelectVisitsTask - config: - connections.visitSummaries: preliminary_visit_summary makeDirectWarp: class: lsst.drp.tasks.make_direct_warp.MakeDirectWarpTask config: connections.visit_summary: preliminary_visit_summary useVisitSummaryPsf: False + selectTemplateCoaddVisits: + class: lsst.pipe.tasks.selectImages.BestSeeingQuantileSelectVisitsTask + config: + connections.visitSummaries: preliminary_visit_summary assembleTemplateCoadd: class: lsst.drp.tasks.assemble_coadd.CompareWarpAssembleCoaddTask config: - connections.selectedVisits: deep_coadd_visit_selection maxFractionEpochsHigh: 0.2 badMaskPlanes: ["NO_DATA", "BAD", "SAT", "EDGE", "SPIKE"] prefilterArtifactsMaskPlanes: ["NO_DATA", "BAD", "SUSPECT", "SPIKE"] subsets: - makeTemplate: + singleFrame: subset: - isr - calibrateImage + description: > + Tasks to run to get preliminary visit images. + makeTemplate: + subset: - consolidateVisitSummary - - selectDeepCoaddVisits + - selectTemplateCoaddVisits - makeDirectWarp - makePsfMatchedWarp - assembleTemplateCoadd description: > Tasks to run to build good seeing coadds for use as templates. + makeMetrics: + subset: + - makeTemplateCoaddInputSummaryTract + - makeTemplateCoaddInputSummary + - makeBinnedTemplateCoaddImage + - makeBinnedTemplateCoaddNImage + - makeWholeTractTemplateCoaddImage + - makeWholeTractTemplateCoaddNImage + - aggregateTemplateCoaddMaskFractions + - makeAggregatedTemplateCoaddMaskFractionsTable + - aggregatedTemplateCoaddMaskFractionsWholeSkyPlot + - analyzeCoaddDepthCore + - coaddDepthMetricTract + description: > + Metrics and plots to run on the templates. contracts: # Inputs and outputs must match. For consistency, contracts are written in execution order: @@ -66,11 +97,11 @@ contracts: makeDirectWarp.connections.ConnectionsClass(config=makeDirectWarp).calexp_list.name msg: "calibrateImage.exposure != makeWarp.calexp_list" - contract: consolidateVisitSummary.connections.ConnectionsClass(config=consolidateVisitSummary).visitSummary.name == - selectDeepCoaddVisits.connections.ConnectionsClass(config=selectDeepCoaddVisits).visitSummaries.name - msg: "consolidateVisitSummary.visitSummary != selectDeepCoaddVisits.visitSummaries" + selectTemplateCoaddVisits.connections.ConnectionsClass(config=selectTemplateCoaddVisits).visitSummaries.name + msg: "consolidateVisitSummary.visitSummary != selectTemplateCoaddVisits.visitSummaries" - contract: consolidateVisitSummary.connections.ConnectionsClass(config=consolidateVisitSummary).visitSummary.name == makeDirectWarp.connections.ConnectionsClass(config=makeDirectWarp).visit_summary.name msg: "consolidateVisitSummary.visitSummary != makeDirectWarp.visit_summary" - - contract: selectDeepCoaddVisits.connections.ConnectionsClass(config=selectDeepCoaddVisits).goodVisits.name == + - contract: selectTemplateCoaddVisits.connections.ConnectionsClass(config=selectTemplateCoaddVisits).goodVisits.name == assembleTemplateCoadd.connections.ConnectionsClass(config=assembleTemplateCoadd).selectedVisits.name - msg: "selectDeepCoaddVisits.goodVisits != assembleTemplateCoadd.selectedVisits" + msg: "selectTemplateCoaddVisits.goodVisits != assembleTemplateCoadd.selectedVisits" From 0d24a2fcfc9146936b862abb7b81ab0ff0639880 Mon Sep 17 00:00:00 2001 From: Erin Howard Date: Thu, 13 Aug 2026 14:49:40 -0700 Subject: [PATCH 2/2] Add DECam specfic configs to QuickTemplate --- pipelines/DECam/QuickTemplate.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pipelines/DECam/QuickTemplate.yaml b/pipelines/DECam/QuickTemplate.yaml index 9ba79b86..923ca2f0 100644 --- a/pipelines/DECam/QuickTemplate.yaml +++ b/pipelines/DECam/QuickTemplate.yaml @@ -11,3 +11,9 @@ tasks: config: connections.outputExposure: post_isr_image file: $AP_PIPE_DIR/config/DECam/runIsrWithCrosstalk.py + selectTemplateCoaddVisits: + class: lsst.pipe.tasks.selectImages.BestSeeingQuantileSelectVisitsTask + config: + maxPsfFwhm: 1.8 + nVisitsMin: 8 + qMax: 0.5