From f60cda387dcfc86cb68de2be15c925811027490b Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Mon, 19 Aug 2024 10:43:49 -0700 Subject: [PATCH 1/2] Fix instrument specializations of ApVerifyWithFakes. The instrument specializations ran the generic ApPipe instead of the instrument-specific ApPipe. This prevented DECam from correctly handling crosstalk. The same splice for the other instruments is purely defensive, since right now they don't need any customization. --- pipelines/DECam/ApVerifyWithFakes.yaml | 28 +++++++++++++++++ pipelines/HSC/ApVerifyWithFakes.yaml | 30 ++++++++++++++++++- .../LSSTCam-imSim/ApVerifyWithFakes.yaml | 28 +++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/pipelines/DECam/ApVerifyWithFakes.yaml b/pipelines/DECam/ApVerifyWithFakes.yaml index 106b361..5c2ca32 100644 --- a/pipelines/DECam/ApVerifyWithFakes.yaml +++ b/pipelines/DECam/ApVerifyWithFakes.yaml @@ -8,3 +8,31 @@ instrument: lsst.obs.decam.DarkEnergyCamera description: Fully instrumented AP pipeline with fakes, specialized for DECam imports: - location: $AP_VERIFY_DIR/pipelines/_ingredients/ApVerifyWithFakes.yaml + # Include all metrics from standard pipeline. It's not practical to create + # a metrics subset because it would require constant micromanagement. + exclude: + - apPipe + - location: $AP_PIPE_DIR/pipelines/DECam/ApPipeWithFakes.yaml +tasks: + # ApVerify override removed by excluding apPipe. + diaPipe: + class: lsst.ap.association.DiaPipelineTask + config: + doPackageAlerts: True + alertPackager.doWriteAlerts: True +contracts: + # Contracts removed by excluding apPipe + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag20t22.connections.ConnectionsClass(config=apFakesCompletenessMag20t22).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag22t24.connections.ConnectionsClass(config=apFakesCompletenessMag22t24).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag24t26.connections.ConnectionsClass(config=apFakesCompletenessMag24t26).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag20t22.connections.ConnectionsClass(config=apFakesCountMag20t22).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag22t24.connections.ConnectionsClass(config=apFakesCountMag22t24).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag24t26.connections.ConnectionsClass(config=apFakesCountMag24t26).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCount.connections.ConnectionsClass(config=apFakesCount).matchedFakes.name diff --git a/pipelines/HSC/ApVerifyWithFakes.yaml b/pipelines/HSC/ApVerifyWithFakes.yaml index cdec623..77d8b09 100644 --- a/pipelines/HSC/ApVerifyWithFakes.yaml +++ b/pipelines/HSC/ApVerifyWithFakes.yaml @@ -1,7 +1,35 @@ -# Verification pipeline specialized for HSC, with fak source injection. +# Verification pipeline specialized for HSC, with fake source injection. # This concatenates various lsst.verify metrics to an AP pipeline instrument: lsst.obs.subaru.HyperSuprimeCam description: Fully instrumented AP pipeline with fakes, specialized for HSC imports: - location: $AP_VERIFY_DIR/pipelines/_ingredients/ApVerifyWithFakes.yaml + # Include all metrics from standard pipeline. It's not practical to create + # a metrics subset because it would require constant micromanagement. + exclude: + - apPipe + - location: $AP_PIPE_DIR/pipelines/HSC/ApPipeWithFakes.yaml +tasks: + # ApVerify override removed by excluding apPipe. + diaPipe: + class: lsst.ap.association.DiaPipelineTask + config: + doPackageAlerts: True + alertPackager.doWriteAlerts: True +contracts: + # Contracts removed by excluding apPipe + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag20t22.connections.ConnectionsClass(config=apFakesCompletenessMag20t22).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag22t24.connections.ConnectionsClass(config=apFakesCompletenessMag22t24).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag24t26.connections.ConnectionsClass(config=apFakesCompletenessMag24t26).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag20t22.connections.ConnectionsClass(config=apFakesCountMag20t22).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag22t24.connections.ConnectionsClass(config=apFakesCountMag22t24).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag24t26.connections.ConnectionsClass(config=apFakesCountMag24t26).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCount.connections.ConnectionsClass(config=apFakesCount).matchedFakes.name diff --git a/pipelines/LSSTCam-imSim/ApVerifyWithFakes.yaml b/pipelines/LSSTCam-imSim/ApVerifyWithFakes.yaml index 06af1e0..5c05567 100644 --- a/pipelines/LSSTCam-imSim/ApVerifyWithFakes.yaml +++ b/pipelines/LSSTCam-imSim/ApVerifyWithFakes.yaml @@ -5,3 +5,31 @@ instrument: lsst.obs.lsst.LsstCamImSim description: Fully instrumented AP pipeline with fakes, specialized for LSSTCam-imSim imports: - location: $AP_VERIFY_DIR/pipelines/_ingredients/ApVerifyWithFakes.yaml + # Include all metrics from standard pipeline. It's not practical to create + # a metrics subset because it would require constant micromanagement. + exclude: + - apPipe + - location: $AP_PIPE_DIR/pipelines/LSSTCam-imSim/ApPipeWithFakes.yaml +tasks: + # ApVerify override removed by excluding apPipe. + diaPipe: + class: lsst.ap.association.DiaPipelineTask + config: + doPackageAlerts: True + alertPackager.doWriteAlerts: True +contracts: + # Contracts removed by excluding apPipe + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag20t22.connections.ConnectionsClass(config=apFakesCompletenessMag20t22).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag22t24.connections.ConnectionsClass(config=apFakesCompletenessMag22t24).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCompletenessMag24t26.connections.ConnectionsClass(config=apFakesCompletenessMag24t26).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag20t22.connections.ConnectionsClass(config=apFakesCountMag20t22).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag22t24.connections.ConnectionsClass(config=apFakesCountMag22t24).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCountMag24t26.connections.ConnectionsClass(config=apFakesCountMag24t26).matchedFakes.name + - injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name == + apFakesCount.connections.ConnectionsClass(config=apFakesCount).matchedFakes.name From 18915ad0c6f644c4580c8ef4f85150ddada9f455 Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Mon, 19 Aug 2024 10:46:48 -0700 Subject: [PATCH 2/2] Synchronize ApVerifyWithFakes to ApVerify. --- pipelines/_ingredients/ApVerifyWithFakes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/pipelines/_ingredients/ApVerifyWithFakes.yaml b/pipelines/_ingredients/ApVerifyWithFakes.yaml index 905f99d..63ccf30 100644 --- a/pipelines/_ingredients/ApVerifyWithFakes.yaml +++ b/pipelines/_ingredients/ApVerifyWithFakes.yaml @@ -14,6 +14,7 @@ tasks: # TODO: needed for "providing bulk sample alerts to brokers"; remove once # we have an alternative. doPackageAlerts: True + alertPackager.doWriteAlerts: True contracts: # Metric inputs must match pipeline outputs # Use of ConnectionsClass for templated fields is a workaround for DM-30210