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-27854: CpFlatNormalizationTask improperly indexes detectors #68

Merged
merged 2 commits into from Dec 5, 2020

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Dec 3, 2020

Use detector indices instead of detector-scale indices.

@czwa czwa requested a review from mrawls December 3, 2020 20:54
Copy link
Contributor

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

The change looks OK and should fix the problem.

Please consider renaming detSet to, e.g., detectorsWithData and expSet correspondingly to, e.g., exposuresWithData. Throughout, I do think it would read more clearly if you wrote out exposure and detector in the variable names, including detectorScales and exposureScales, etc., but I'm not going to insist on it everywhere.

Comment on lines +297 to +298
# Note that the enumerated "detId"/"expId" here index the
# "detScales" and "expScales" arrays.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment does enhance clarity, but I'd prefer not reusing detId and expId here since they were defined previously (lines 254-255 or lines 273-274). Perhaps for detectorIdx, detector in enumerate(expSet) and for exposureIdx, exposure in enumerate(expSet)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed every variable in the run method that is a matrix index to have the Idx suffix, to avoid confusion with dataId identifiers.

@czwa czwa merged commit 42917e2 into master Dec 5, 2020
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