Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-45087: Remove step8 from HSC/ImSim and move its analysis tasks upstream #135

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bps/clustering/DRP-recalibrated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cluster:
pipetasks: assembleCoadd,inject_coadd,templateGen,detection
dimensions: tract,patch,band

sourceTable:
pipetasks: writeRecalibratedSourceTable,transformSourceTable
finalizeSourceTable:
pipetasks: finalizeCharacterization,updateVisitSummary,writeRecalibratedSourceTable,transformSourceTable,consolidateSourceTable
dimensions: visit
equalDimensions: visit:exposure

Expand Down
2 changes: 0 additions & 2 deletions bps/resources/HSC/DRP-RC2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ pipetask:
requestMemory: 10000
detection:
requestMemory: 16384

# step8 tasks - sasquatch
analyzeObjectTableCore:
requestMemory: 16000
analyzeMatchedVisitCore:
Expand Down
33 changes: 13 additions & 20 deletions pipelines/HSC/DRP-Prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ subsets:
- calibrate
- writePreSourceTable
- transformPreSourceTable
- analyzeAmpOffsetMetadata
description: |
Per-detector tasks that can be run together to start the DRP pipeline.
Expand Down Expand Up @@ -99,6 +100,7 @@ subsets:
and CcdVisits.
step3:
subset:
# per-patch tasks
- makeDirectWarp
- makePsfMatchedWarp
- selectDeepCoaddVisits
Expand All @@ -111,8 +113,18 @@ subsets:
- forcedPhotCoadd
- writeObjectTable
- transformObjectTable
# per tract tasks
- consolidateObjectTable
- healSparsePropertyMaps
- analyzeObjectTableCore
- catalogMatchTract
- refCatObjectTract
- validateObjectTableCore
- analyzeMatchedVisitCore
- photometricCatalogMatch
- photometricRefCatObjectTract
- plotPropertyMapTract

description: |
tract-level tasks. Allowed data query constraints: tract
Expand All @@ -134,30 +146,11 @@ subsets:
step7:
subset:
- consolidateHealSparsePropertyMaps
- analyzeObjectTableSurveyCore
description: |
Tasks that should be run as the final step that require global inputs,
and can be run after the 'step3' subset.
This step has global aggregation tasks to run over all visits, detectors,
tracts, etc. This step should be run only with the instrument constraint
in the data query.
step8:
subset:
- analyzeAmpOffsetMetadata
- analyzeObjectTableCore
- analyzeObjectTableSurveyCore
- catalogMatchTract
- refCatObjectTract
- validateObjectTableCore
- analyzeMatchedVisitCore
- photometricCatalogMatch
- photometricRefCatObjectTract
- plotPropertyMapTract
description: |
Core (most important), coadd-level plots/metrics from analysis_tools.
Must be run after 'step3' (writeObjectTable). Cannot be run with any
dataquery constraints if analyzeObjectTableSurveyCore is included.
Can be run together with analysis_drp subsets, e.g. pipeline.yaml
(hash/pound sign)step8,analysis_coadd_plots,imsim_analysis_coadd_plots
73 changes: 28 additions & 45 deletions pipelines/HSC/DRP-RC2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,7 @@ tasks:
objectTableCoreRefCatMatchWholeSkyPlot:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove all the configs expect "band" for matchedVisitCoreWholeSkyPlot and objectTableCoreWholeSkyPlot

class: lsst.analysis.tools.tasks.WholeSkyAnalysisTask
config:
connections.inputName: "objectTable_tract_gaia_dr3_20230707_match_metricsTable"
connections.outputName: "objectTableCoreRefCatMatch_wholeSky"
atools.wholeSkyMetric: WholeSkyPlotTool
atools.wholeSkyMetric.bands: ["g", "r", "i", "z", "y"]
atools.wholeSkyMetric.plotKeys: []
atools.wholeSkyMetric.keysWithBand: parameters.objectTableCoreRefCatMatchKeysWithBand
python: |
from lsst.analysis.tools.atools import *
subsets:
step1:
subset:
Expand All @@ -108,6 +101,7 @@ subsets:
- calibrate
- writePreSourceTable
- transformPreSourceTable
- analyzeAmpOffsetMetadata
description: |
Per-detector tasks that can be run together to start the DRP pipeline.

Expand Down Expand Up @@ -156,11 +150,17 @@ subsets:
- fgcmFitCycle
- fgcmOutputProducts
- updateVisitSummary
- writeRecalibratedSourceTable
- transformSourceTable
- consolidateSourceTable
- catalogMatchVisit
- astrometricRefCatSourceVisit
- makeCcdVisitTable
- makeVisitTable
description: |
Per-visit and per-collection tasks that can be run together after step2b
with no data query constraints other than instrument.
Per-detector, Per-visit, and per-collection tasks that can be run
together after step2b with no data query constraints other than
instrument.

FGCM requires full visits and 'tract' and 'patch' constraints will
always select partial visits that overlap that region.
Expand All @@ -172,6 +172,7 @@ subsets:
wrong (partial-visit) inputs to its 'background' connection.
step3:
subset:
# per-patch Tasks
- makeDirectWarp
- makePsfMatchedWarp
- selectDeepCoaddVisits
Expand All @@ -184,10 +185,20 @@ subsets:
- forcedPhotCoadd
- transformObjectTable
- writeObjectTable
- consolidateObjectTable
- healSparsePropertyMaps
- selectGoodSeeingVisits
- templateGen
# per-tract Tasks
- consolidateObjectTable
- analyzeMatchedVisitCore
- analyzeMatchedPreVisitCore
- analyzeObjectTableCore
- catalogMatchTract
- photometricCatalogMatch
- photometricRefCatObjectTract
- plotPropertyMapTract
- refCatObjectTract
- validateObjectTableCore
description: |
Tasks that can be run together, but only after the 'step1' and 'step2'
subsets.
Expand All @@ -207,8 +218,6 @@ subsets:
- detectAndMeasureDiaSources
- transformDiaSourceCat
- writeForcedSourceTable
- writeRecalibratedSourceTable
- transformSourceTable
description: |
Tasks that can be run together, but only after the 'step1', 'step2' and
'step3' subsets
Expand Down Expand Up @@ -241,9 +250,6 @@ subsets:
step6:
subset:
- consolidateDiaSourceTable
- consolidateSourceTable
- catalogMatchVisit
- astrometricRefCatSourceVisit
- sourceObjectMatch
description: |
Tasks that can be run together, but only after the 'step1', 'step2',
Expand All @@ -262,40 +268,17 @@ subsets:
step7:
subset:
- consolidateHealSparsePropertyMaps
- matchedVisitCoreWholeSkyPlot
- objectTableCoreWholeSkyPlot
- makeMetricTableMatchedVisitCore
- makeMetricTableObjectTableCore
- makeMetricTableObjectTableCoreRefCatMatch
- objectTableCoreRefCatMatchWholeSkyPlot
- analyzeObjectTableSurveyCore
description: |
Tasks that should be run as the final step that require global inputs,
and can be run after the 'step3' subset.

This step has global aggregation tasks to run over all visits, detectors,
tracts, etc. This step should be run only with the instrument constraint
in the data query.
step8:
subset:
- analyzeAmpOffsetMetadata
- analyzeMatchedVisitCore
- analyzeMatchedPreVisitCore
- analyzeObjectTableCore
- analyzeObjectTableSurveyCore
- catalogMatchTract
- makeMetricTableMatchedVisitCore
- makeMetricTableObjectTableCore
- makeMetricTableObjectTableCoreRefCatMatch
- matchedVisitCoreWholeSkyPlot
- objectTableCoreWholeSkyPlot
- objectTableCoreRefCatMatchWholeSkyPlot
- photometricCatalogMatch
- photometricRefCatObjectTract
- plotPropertyMapTract
- refCatObjectTract
- validateObjectTableCore
description: |
Core (most important), coadd-level plots/metrics from analysis_tools.

Must be run after 'step3' (writeObjectTable). If the task
analyzeObjectTableSurveyCore is included, should be run with either no
data query constraints or with a tract constraint that *exactly* matches
that from 'step3'. Running with only a subset of tracts from step3 will
result in incomplete survey-level outputs.

Can be run together with other analysis_drp/analysis_tools subsets, e.g.
'pipeline.yaml#step8,analysis_coadd_plots,imsim_analysis_coadd_plots'
7 changes: 0 additions & 7 deletions pipelines/HSC/DRP-RC2_subset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,7 @@ tasks:
objectTableCoreRefCatMatchWholeSkyPlot:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove all the configs expect "band" for matchedVisitCoreWholeSkyPlot and objectTableCoreWholeSkyPlot

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also do this in pipelines/HSC/DRP-ci_hsc.yaml

class: lsst.analysis.tools.tasks.WholeSkyAnalysisTask
config:
connections.inputName: "objectTable_tract_gaia_dr3_20230707_match_metricsTable"
connections.outputName: "objectTableCoreRefCatMatch_wholeSky"
atools.wholeSkyMetric: WholeSkyPlotTool
atools.wholeSkyMetric.bands: ["g", "r", "i", "z", "y"]
atools.wholeSkyMetric.plotKeys: []
atools.wholeSkyMetric.keysWithBand: parameters.objectTableCoreRefCatMatchKeysWithBand
python: |
from lsst.analysis.tools.atools import *
psfPhotRepStar1:
class: lsst.faro.measurement.TractMatchedMeasurementTask
config:
Expand Down
41 changes: 15 additions & 26 deletions pipelines/_ingredients/LSSTCam-imSim/DRP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ subsets:
- calibrate
- writeSourceTable
- transformSourceTable
- analyzeAmpOffsetMetadata
description: |
Per-detector tasks that can be run together to start the DRP pipeline.

Expand All @@ -144,6 +145,8 @@ subsets:
- makeCcdVisitTable
- makeVisitTable
- updateVisitSummary
- catalogMatchVisit
- astrometricRefCatSourceVisit
description: |
Tasks that can be run together, but only after the 'step1'.

Expand All @@ -161,6 +164,7 @@ subsets:
Full collection-level tasks include: makeCcdVisitTable, makeVisitTable
step3:
subset:
# Per-patch Tasks
- makeDirectWarp
- makePsfMatchedWarp
- selectDeepCoaddVisits
Expand All @@ -173,12 +177,20 @@ subsets:
- forcedPhotCoadd
- transformObjectTable
- writeObjectTable
- consolidateObjectTable
- healSparsePropertyMaps
- selectGoodSeeingVisits
- templateGen
# Per-tract Tasks
- consolidateObjectTable
- healSparsePropertyMaps
- matchObjectToTruth
- compareObjectToTruth
- analyzeMatchedVisitCore
- analyzeObjectTableCore
- catalogMatchTract
- diff_matched_analysis
- refCatObjectTract
- validateObjectTableCore

description: |
Tasks that can be run together, but only after the 'step1' and 'step2'
subsets.
Expand Down Expand Up @@ -236,8 +248,6 @@ subsets:
step6:
subset:
- consolidateDiaSourceTable
- catalogMatchVisit
- astrometricRefCatSourceVisit
- sourceObjectMatch
description: |
Tasks that can be run together, but only after the 'step1', 'step2',
Expand All @@ -255,35 +265,14 @@ subsets:
step7:
subset:
- consolidateHealSparsePropertyMaps
- analyzeObjectTableSurveyCore
description: |
Tasks that should be run as the final step that require global inputs,
and can be run after the 'step3' subset.

This step has global aggregation tasks to run over all visits, detectors,
tracts, etc. This step should be run only with the instrument constraint
in the data query.
step8:
subset:
- analyzeAmpOffsetMetadata
- analyzeMatchedVisitCore
- analyzeObjectTableCore
- analyzeObjectTableSurveyCore
- catalogMatchTract
- diff_matched_analysis
- refCatObjectTract
- validateObjectTableCore

description: |
Core (most important), coadd-level plots/metrics from analysis_tools.

Must be run after 'step3' (writeObjectTable). Cannot be run with any
dataquery constraints if analyzeObjectTableSurveyCore is included.

Can be run together with analysis_drp subsets, e.g. pipeline.yaml
(hash/pound sign)step8,analysis_coadd_plots,imsim_analysis_coadd_plots

Includes extended-level diff_matched_analysis metrics, which are
considered core for DC2 as they can't be run on other datasets yet.
faro_visit:
subset:
- nsrcMeasVisit
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def test_lsstcam_imsim_drp_ci_imsim(self):
butler = self.makeButler(writeable=True)
tester = PipelineStepTester(
os.path.join(PIPELINES_DIR, "LSSTCam-imSim", "DRP-ci_imsim.yaml"),
[f"#step{N}" for N in range(1, 9)],
[f"#step{N}" for N in range(1, 8)],
[
("cal_ref_cat_2_2", {"htm7"}, "SimpleCatalog", False),
],
Expand All @@ -537,7 +537,7 @@ def test_lsstcam_imsim_drp_test_med_1(self):
butler = self.makeButler(writeable=True)
tester = PipelineStepTester(
os.path.join(PIPELINES_DIR, "LSSTCam-imSim", "DRP-test-med-1.yaml"),
[f"#step{N}" for N in range(1, 9)],
[f"#step{N}" for N in range(1, 8)],
[
("cal_ref_cat_2_2", {"htm7"}, "SimpleCatalog", False),
],
Expand Down
Loading