From 8345e965cfe8f5d757b7c3b05567698a9c025d09 Mon Sep 17 00:00:00 2001 From: BrunoSanchez Date: Wed, 18 Sep 2024 10:28:13 -0700 Subject: [PATCH] Replace legacy metrics for ApVerifyWithFakes Replace metrics in MetricsForFakes.yaml for analysis_tools based metrics of completeness. New metrics come inherently inside ap_pipe ApPipeWithFakes.yaml. Delete the MetricsForFakes.yaml file and modify contracts in all pipeline yaml files to reflect this change. --- pipelines/DECam/ApVerifyWithFakes.yaml | 16 ----- pipelines/HSC/ApVerifyWithFakes.yaml | 16 ----- .../LSSTCam-imSim/ApVerifyWithFakes.yaml | 16 ----- pipelines/_ingredients/ApVerifyWithFakes.yaml | 18 ------ pipelines/_ingredients/MetricsForFakes.yaml | 62 ------------------- 5 files changed, 128 deletions(-) delete mode 100644 pipelines/_ingredients/MetricsForFakes.yaml diff --git a/pipelines/DECam/ApVerifyWithFakes.yaml b/pipelines/DECam/ApVerifyWithFakes.yaml index 5c2ca320..f5acee8c 100644 --- a/pipelines/DECam/ApVerifyWithFakes.yaml +++ b/pipelines/DECam/ApVerifyWithFakes.yaml @@ -20,19 +20,3 @@ tasks: 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 77d8b09c..d15cd727 100644 --- a/pipelines/HSC/ApVerifyWithFakes.yaml +++ b/pipelines/HSC/ApVerifyWithFakes.yaml @@ -17,19 +17,3 @@ tasks: 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 5c055677..c7c401eb 100644 --- a/pipelines/LSSTCam-imSim/ApVerifyWithFakes.yaml +++ b/pipelines/LSSTCam-imSim/ApVerifyWithFakes.yaml @@ -17,19 +17,3 @@ tasks: 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/_ingredients/ApVerifyWithFakes.yaml b/pipelines/_ingredients/ApVerifyWithFakes.yaml index 63ccf301..baaa17f9 100644 --- a/pipelines/_ingredients/ApVerifyWithFakes.yaml +++ b/pipelines/_ingredients/ApVerifyWithFakes.yaml @@ -5,7 +5,6 @@ description: Fully instrumented AP pipeline with fakes imports: - location: $AP_PIPE_DIR/pipelines/_ingredients/ApPipeWithFakes.yaml # Most metrics should not be run with fakes, to avoid bias or contamination. - - location: $AP_VERIFY_DIR/pipelines/_ingredients/MetricsForFakes.yaml - location: $AP_VERIFY_DIR/pipelines/_ingredients/ConversionsForFakes.yaml tasks: diaPipe: @@ -15,20 +14,3 @@ tasks: # 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 - - 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/_ingredients/MetricsForFakes.yaml b/pipelines/_ingredients/MetricsForFakes.yaml deleted file mode 100644 index 5bc41883..00000000 --- a/pipelines/_ingredients/MetricsForFakes.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Miscellaneous metrics for Alert Production -# In the future, these might be placed in task-specific pipelines (for debugging) -# or grouped by their datasets (to optimize expensive Butler reads) - -description: Miscelaneous AP Pipeline metrics -tasks: - apFakesCompletenessMag20t22: - class: lsst.ap.pipe.metrics.ApFakesCompletenessMetricTask - config: - connections.metric: ApFakesCompletenessMag20t22 - magMin: 20 - magMax: 22 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType - apFakesCompletenessMag22t24: - class: lsst.ap.pipe.metrics.ApFakesCompletenessMetricTask - config: - connections.metric: ApFakesCompletenessMag22t24 - magMin: 22 - magMax: 24 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType - apFakesCompletenessMag24t26: - class: lsst.ap.pipe.metrics.ApFakesCompletenessMetricTask - config: - connections.metric: ApFakesCompletenessMag24t26 - magMin: 24 - magMax: 26 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType - apFakesCountMag20t22: - class: lsst.ap.pipe.metrics.ApFakesCountMetricTask - config: - connections.metric: ApFakesCountMag20t22 - magMin: 20 - magMax: 22 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType - apFakesCountMag22t24: - class: lsst.ap.pipe.metrics.ApFakesCountMetricTask - config: - connections.metric: ApFakesCountMag22t24 - magMin: 22 - magMax: 24 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType - apFakesCountMag24t26: - class: lsst.ap.pipe.metrics.ApFakesCountMetricTask - config: - connections.metric: ApFakesCountMag24t26 - magMin: 24 - magMax: 26 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType - apFakesCount: - class: lsst.ap.pipe.metrics.ApFakesCountMetricTask - config: - connections.metric: ApFakesCount - magMin: 1 - magMax: 39 - connections.coaddName: parameters.coaddName - connections.fakesType: parameters.fakesType