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-34254: Validate piff psf kernel size vs. input psf candidates #11

Merged
merged 5 commits into from May 6, 2022

Conversation

parejkoj
Copy link
Contributor

No description provided.

This should be caught by MeasurePsfTask, or by piff itself, but if not
it can result in catastrophically bad fits.
Remove pointless `exposure` arg.
Use actual PiffPsfDeterminer classes instead of registry.
@@ -315,5 +316,28 @@ def determinePsf(

return psf, None

def _validatePsfCandidates(self, psfCandidateList, kernelSize):
Copy link

Choose a reason for hiding this comment

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

Do the psfCandidates in psfCandidateList have a well-defined (constant) size? The python for loop in this function is adding an unnecessary performance hit if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question: we don't enforce the psfCandidate size when constructing that list (and it's just a list, not a coherent data structure). But the primary usage gets them from MakePsfCandidatesTask, which has a single config.kernelSize. So, I think you're right that we can just assume they're all the same and only test the first one. I do hope that piff upstream implements an internal check as well, though.

We can pretty safely assume all the candidates have the same dimensions.
@parejkoj parejkoj merged commit 2280a9d into main May 6, 2022
@parejkoj parejkoj deleted the tickets/DM-34254 branch May 6, 2022 22:43
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