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-43848: Add the new task for spatially sampled metrics. #177

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions pipelines/_ingredients/ApPipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ tasks:
config:
connections.exposure: initial_pvi
connections.coaddName: parameters.coaddName
sampleSpatialMetrics:
class: lsst.ip.diffim.SpatiallySampledMetricsTask
config:
connections.science: initial_pvi
connections.coaddName: parameters.coaddName
subsets:
apPipe:
subset:
Expand All @@ -77,9 +82,10 @@ subsets:
- diaPipe
- analyzeAssocDiaSrcCore
- analyzeTrailedDiaSrcCore
- sampleSpatialMetrics
- diffimTaskCore
- diffimTaskPlots
- initialPviCore
- initialPviCore
description: >
An alias of ApPipe to use in higher-level pipelines.
contracts:
Expand Down Expand Up @@ -126,9 +132,6 @@ contracts:
- contract: detectAndMeasure.connections.ConnectionsClass(config=detectAndMeasure).subtractedMeasuredExposure.name ==
diaPipe.connections.ConnectionsClass(config=diaPipe).diffIm.name
msg: "detectAndMeasure.subtractedMeasuredExposure != diaPipe.diffIm"
- contract: detectAndMeasure.connections.ConnectionsClass(config=detectAndMeasure).spatiallySampledMetrics.name ==
diffimTaskPlots.connections.ConnectionsClass(config=diffimTaskPlots).data.name
msg: "detectAndMeasure.spatiallySampledMetrics != diffimTaskPlots.data"
- contract: filterDiaSrcCat.connections.ConnectionsClass(config=filterDiaSrcCat).filteredDiaSourceCat.name ==
rbClassify.connections.ConnectionsClass(config=rbClassify).diaSources.name
msg: "filterDiaSrcCat.filteredDiaSourceCat != rbClassify.diaSources"
Expand All @@ -148,3 +151,6 @@ contracts:
- contract: diaPipe.connections.ConnectionsClass(config=diaPipe).longTrailedSources.name ==
analyzeTrailedDiaSrcCore.connections.ConnectionsClass(config=analyzeTrailedDiaSrcCore).data.name
msg: "diaPipe.longTrailedSources != analyzeTrailedDiaSrcCore.data"
- contract: sampleSpatialMetrics.connections.ConnectionsClass(config=sampleSpatialMetrics).spatiallySampledMetrics.name ==
diffimTaskPlots.connections.ConnectionsClass(config=diffimTaskPlots).data.name
msg: "sampleSpatialMetrics.spatiallySampledMetrics != diffimTaskPlots.data"
14 changes: 11 additions & 3 deletions pipelines/_ingredients/ApPipeWithFakes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ tasks:
connections.coaddName: parameters.coaddName
connections.fakesType: parameters.fakesType
# apdb.db_url: YOU MUST CONFIGURE THIS BEFORE RUNNING THE PIPELINE
sampleSpatialMetrics:
class: lsst.ip.diffim.SpatiallySampledMetricsTask
config:
connections.science: initial_pvi
connections.coaddName: parameters.coaddName
connections.fakesType: parameters.fakesType
fakesMatch:
class: lsst.pipe.tasks.matchFakes.MatchVariableFakesTask
config:
Expand All @@ -114,9 +120,11 @@ subsets:
- transformDiaSrcCat
- diaPipe
- fakesMatch
- sampleSpatialMetrics
- analyzeAssocDiaSrcCore
- analyzeTrailedDiaSrcCore
- diffimTaskCore
- diffimTaskPlots
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. I was doing this on my end for one test related to new source injection pipeline.

description: >
The AP pipeline with fakes. Requires apPipe and prepareFakes subsets.

Expand Down Expand Up @@ -170,9 +178,6 @@ contracts:
- contract: detectAndMeasure.connections.ConnectionsClass(config=detectAndMeasure).subtractedMeasuredExposure.name ==
fakesMatch.connections.ConnectionsClass(config=fakesMatch).diffIm.name
msg: "detectAndMeasure.subtractedMeasuredExposure != fakesMatch.diffIm"
- contract: detectAndMeasure.connections.ConnectionsClass(config=detectAndMeasure).spatiallySampledMetrics.name ==
diffimTaskPlots.connections.ConnectionsClass(config=diffimTaskPlots).data.name
msg: "detectAndMeasure.spatiallySampledMetrics != diffimTaskPlots.spatiallySampledMetrics"
- contract: filterDiaSrcCat.connections.ConnectionsClass(config=filterDiaSrcCat).filteredDiaSourceCat.name ==
rbClassify.connections.ConnectionsClass(config=rbClassify).diaSources.name
msg: "filterDiaSrcCat.filteredDiaSourceCat != rbClassify.diaSources"
Expand All @@ -195,3 +200,6 @@ contracts:
- contract: diaPipe.connections.ConnectionsClass(config=diaPipe).longTrailedSources.name ==
analyzeTrailedDiaSrcCore.connections.ConnectionsClass(config=analyzeTrailedDiaSrcCore).data.name
msg: "diaPipe.longTrailedSources != analyzeTrailedDiaSrcCore.data"
- contract: sampleSpatialMetrics.connections.ConnectionsClass(config=sampleSpatialMetrics).spatiallySampledMetrics.name ==
diffimTaskPlots.connections.ConnectionsClass(config=diffimTaskPlots).data.name
msg: "sampleSpatialMetrics.spatiallySampledMetrics != diffimTaskPlots.data"