Skip to content

Commit

Permalink
Refactor ci_imsim to use reprocessVisitImage
Browse files Browse the repository at this point in the history
ci_imsim doesn't have much of the visit-level processing (e.g. fgcmcal), but
we still have to run reprocessVisitImage to get the full source catalog, since
calibrateImage only produces a catalog of stars, with fewer measurements.
This then requires treating the stars catalog as a "preSourceTable" and adding
some other tasks that would normally only be run in a "full" pipeline.
  • Loading branch information
parejkoj committed Sep 19, 2024
1 parent 8e6d320 commit cbc6df9
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions pipelines/_ingredients/LSSTCam-imSim/DRP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,37 @@ tasks:
class: lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask
config:
connections.refCat: "cal_ref_cat_2_2"
connections.sourceTableHandles: preSourceTable_visit
python: |
config.match.refObjLoader.filterMap = parameters.filterMap
# PreSource tasks are defined here so that the output of calibrateImage can
# be passed on to isolatedStarAssocation.
transformPreSourceTable:
class: lsst.pipe.tasks.postprocess.TransformSourceTableTask
config:
connections.inputCatalog: initial_stars_detector
connections.outputCatalog: preSourceTable
python: |
import os.path
config.functorFile = os.path.join("$PIPE_TASKS_DIR", "schemas", "initial_stars_detector_standardized.yaml")
consolidatePreSourceTable:
class: lsst.pipe.tasks.postprocess.ConsolidateSourceTableTask
config:
connections.inputCatalogs: preSourceTable
connections.outputCatalog: preSourceTable_visit
# Use the above preSource tables.
isolatedStarAssociation:
class: lsst.pipe.tasks.isolatedStarAssociation.IsolatedStarAssociationTask
config:
connections.source_table_visit: preSourceTable_visit
reprocessVisitImage:
class: lsst.drp.tasks.reprocess_visit_image.ReprocessVisitImageTask
config:
# Sky correction isn't run on imsim: there's no large background to fit!
do_use_sky_corr: false
# Significantly limit the number of sources to deblend, which saves time
# in both deblending and measurement.
deblend.useCiLimits: true
matchObjectToTruth:
class: lsst.pipe.tasks.match_tract_catalog.MatchTractCatalogTask
config:
Expand Down Expand Up @@ -120,7 +145,7 @@ subsets:
subset:
- isr
- calibrateImage
- transformSourceTable
- transformPreSourceTable
- analyzeAmpOffsetMetadata
description: |
Per-detector tasks that can be run together to start the DRP pipeline.
Expand All @@ -134,16 +159,13 @@ subsets:
failures before continuing on to step2.
step2:
subset:
- consolidateSourceTable
- consolidateVisitSummary
- consolidatePreSourceTable
- isolatedStarAssociation
- finalizeCharacterization
- makeCcdVisitTable
- makeVisitTable
- updateVisitSummary
- reprocessVisitImage
- catalogMatchVisit
- astrometricRefCatSourceVisit
- consolidateVisitSummary
description: |
Tasks that can be run together, but only after the 'step1'.
Expand Down Expand Up @@ -181,7 +203,6 @@ subsets:
- healSparsePropertyMaps
- matchObjectToTruth
- compareObjectToTruth
- analyzeMatchedVisitCore
- analyzeObjectTableCore
- catalogMatchTract
- diff_matched_analysis
Expand Down Expand Up @@ -213,6 +234,12 @@ subsets:
- detectAndMeasureDiaSources
- transformDiaSourceCat
- writeForcedSourceTable
- reprocessVisitImage
- transformSourceTable
- consolidateSourceTable
- catalogMatchVisit
- analyzeMatchedVisitCore
- astrometricRefCatSourceVisit
description: |
Tasks that can be run together, but only after the 'step1', 'step2' and
'step3' subsets
Expand Down

0 comments on commit cbc6df9

Please sign in to comment.