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-42160: eo_pipe/cp_verify parity: dark #226

Merged
merged 2 commits into from Jan 22, 2024
Merged

DM-42160: eo_pipe/cp_verify parity: dark #226

merged 2 commits into from Jan 22, 2024

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Jan 12, 2024

Add calibration distribution statistics.

@@ -612,6 +615,33 @@ def setFilter(exp, filterLabel):
"""
pass

def calibStats(self, exp, calibrationType):
Copy link
Member

Choose a reason for hiding this comment

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

This could be a static method, I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left alone, as this now uses a config parameter.

metadata.set(f"LSST CALIB {calibrationType.upper()} {amp.getName()} DISTRIBUTION 84-PCT", p84)
metadata.set(f"LSST CALIB {calibrationType.upper()} {amp.getName()} DISTRIBUTION 95-PCT", p95)
metadata.set(f"LSST CALIB {calibrationType.upper()} {amp.getName()} DISTRIBUTION 100-PCT", p100)

Copy link
Member

Choose a reason for hiding this comment

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

Instead of hard-coding these, could we take the percentile values to compute as an input, and loop over those?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, hard coding this is likely to be annoying in the future. I've moved the percentile levels to a config option, and have this method zip the levels and measured values into a second loop. Then, if someone decides the quartiles are useful too, it's just a config change.

Copy link
Member

Choose a reason for hiding this comment

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

PS metadata[key] = value should work fine.

@czwa czwa merged commit f576ed6 into main Jan 22, 2024
2 checks passed
@czwa czwa deleted the tickets/DM-42160 branch January 22, 2024 20:27
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.

None yet

3 participants