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-39332: Fix the PF1 metric to be threshold relative to mean #138

Merged
merged 3 commits into from Aug 24, 2023

Conversation

jeffcarlin
Copy link
Collaborator

This ticket makes the PF1 metric calculation ("stellarPhotRepeatOutlierFraction") use a threshold relative to the median as defined in the SRD, rather than taking a simple threshold in rms. It involved changing the ScalarAction and HistPlot.

@@ -536,7 +541,7 @@ def _calcStats(self, data):
mad = sigmaMad(data)
return num, med, mad

def _addReferenceLines(self, ax, panel, panel_range, legend_font_size=7):
def _addReferenceLines(self, ax, panel, panel_range, meds, legend_font_size=7):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should meds be a kwarg? Looks like it is optional later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it makes more sense to keep it a required input. Even though it is only used if the refRelativeToMedian flag is set, I'd rather be sure it's there when that flag is set than have an error when the flag is set and meds is not passed.

@jeffcarlin
Copy link
Collaborator Author

@jeffcarlin jeffcarlin merged commit d43a604 into main Aug 24, 2023
8 checks passed
@jeffcarlin jeffcarlin deleted the tickets/DM-39332 branch August 24, 2023 19:19
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

2 participants