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-46122: Replace verify metrics for Completeness and Count based on magnitudes #237

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

BrunoSanchez
Copy link
Contributor

{Summary of changes. Prefix PR title with JIRA issue.}


  • Do unit tests pass (scons and/or stack-os-matrix)?
  • Did you run ap_verify.py on at least one of the standard datasets?
    For changes to metrics, the print_metricvalues script from lsst.verify will be useful.
  • Is the Sphinx documentation up-to-date?

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Code changes look good, but please clean up the commit history before merging.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

Please rearrange the commits so that this import is removed before MetricsForFakes.yaml. Otherwise, the pipeline is in a broken state.

Copy link
Member

Choose a reason for hiding this comment

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

It might be worth mentioning in the commit message body that the new metrics come from ApPipeWithFakes, not ap_verify. That confused me until I could trace the imports.

Comment on lines -55 to -62
apFakesCount:
class: lsst.ap.pipe.metrics.ApFakesCountMetricTask
config:
connections.metric: ApFakesCount
magMin: 1
magMax: 39
connections.coaddName: parameters.coaddName
connections.fakesType: parameters.fakesType
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to remove this task as well? I don't think we ever used it, but I don't see a counterpart in lsst/analysis_tools#286.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This count is an output of every completeness metric now. By default we are delivering the completeness ratio (between 0 and 1) together with the total number of fakes in the bin and the number of the found fakes.
In this way, a count is redundant.

- 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
Copy link
Member

Choose a reason for hiding this comment

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

Please do this removal on the same commit as the contracts in _ingredients. The contracts should be consistent at all times.

apFakesCountMag24t26.connections.ConnectionsClass(config=apFakesCountMag24t26).matchedFakes.name
- injectedMatch.connections.ConnectionsClass(config=injectedMatch).matchedDiaSources.name ==
apFakesCount.connections.ConnectionsClass(config=apFakesCount).matchedFakes.name
# contracts:
Copy link
Member

Choose a reason for hiding this comment

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

Please don't commit commented-out lines.

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.
@BrunoSanchez BrunoSanchez merged commit 8818d04 into main Sep 19, 2024
2 checks passed
@BrunoSanchez BrunoSanchez deleted the tickets/DM-46122 branch September 19, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants