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-42163: eo_pipe/cp_verify parity: ptc #228
Conversation
cdad8a1
to
d94a2a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight None/nan issue, but I think it's a quick fix.
@@ -809,12 +816,15 @@ def measureMeanVarCov(self, im1Area, im2Area, imStatsCtrl, mu1, mu2): | |||
Covariance at (dx, dy). | |||
nPix : `int` | |||
Number of pixel pairs used to evaluate var and cov. | |||
rowMeanVariance : `float` or `NaN` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NaN is just a flavor of float.
|
||
If either mu1 or m2 are NaN's, the returned value is NaN. | ||
""" | ||
if np.isnan(mu1) or np.isnan(mu2): | ||
self.log.warning("Mean of amp in image 1 or 2 is NaN: %f, %f.", mu1, mu2) | ||
return np.nan, np.nan, None | ||
return np.nan, np.nan, None, np.nan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test above (L587) tests for is None
, not np.nan
. Same point for the other returns below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the test to check for np.nan
2a531f7
to
c223992
Compare
c223992
to
c24e7b7
Compare
self.log.warning("NaN mean or var, or None cov in amp %s in exposure pair %d, %d of " | ||
if (np.isnan(muDiff) or np.isnan(varDiff) or (covAstier is None) | ||
or (rowMeanVariance is np.nan)): | ||
self.log.warning("NaN mean, var or rowmeanVariance, or None cov in amp %s " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"rowMeanVariance"? Just for consistency.
No description provided.