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-37643: ci_cpp_gen3 fails on cpPtcExtract when noise is None #166

Merged
merged 1 commit into from Feb 6, 2023

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Jan 20, 2023

Use NaN instead of None to prevent potential serialization issues.

@czwa czwa requested a review from plazas January 20, 2023 22:23
Copy link
Contributor

@plazas plazas left a comment

Choose a reason for hiding this comment

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

Looks good.

@@ -756,9 +756,9 @@ def getGainFromFlatPair(self, im1Area, im2Area, imStatsCtrl, mu1, mu2,
if correctionType not in ['NONE', 'SIMPLE', 'FULL']:
raise RuntimeError("Unknown correction type: %s" % correctionType)

if correctionType != 'NONE' and readNoise is None:
if correctionType != 'NONE' and not np.isfinite(readNoise):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why np.isfinite instead of np.isnan? Just curious, I guess that, for this case, they work the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason. isfinite catches other values that aren't plausible as well, but there are other impossible values (negative values). I'm going to leave it for now.

@czwa czwa merged commit f838e9e into main Feb 6, 2023
@czwa czwa deleted the tickets/DM-37643 branch February 6, 2023 22:13
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