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-27185: ptc.py fails with ptcFitType=FULLCOVARIANCE #60
Conversation
7debc95
to
8758c92
Compare
python/lsst/cp/pipe/ptc.py
Outdated
@@ -654,6 +666,8 @@ def measureMeanVarCov(self, exposure1, exposure2, region=None, covAstierRealSpac | |||
wDiff = np.where(diffIm.getMask().getArray() == 0, 1, 0) | |||
w = w12*wDiff | |||
|
|||
w = wDiff |
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.
Do you need to calculate w1 and w2 now? If I'm reading this correctly, you now only check the difference image, and don't use w12, right?
@@ -601,8 +602,6 @@ def fitFullModel(self, pInit=None, nSigma=5.0, maxFitIter=3): | |||
if counter == maxFitIter: | |||
break | |||
|
|||
if ierr not in [1, 2, 3, 4]: |
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.
Are these errors not a problem anymore? Do they not cause raisable errors? Maybe just a comment that this triggers the "else" statement on ptc.py L536 if I'm following correctly (the errors yield a None that results in the bad amp detection and NaN entries as appropriate).
It might also be good to warn if it stops iterating from hitting the maxFitIter.
@@ -282,6 +282,51 @@ def makeDataRefList(self, namespace): | |||
self.refList += refList | |||
|
|||
|
|||
def irlsFit(initialParams, dataX, dataY, function, weightsY=None): |
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 two commits adding this should be squashed together so the indentations are correct on the first ticket.
5f3a373
to
0f1b4c8
Compare
Fix bug in indentation in utils
0f1b4c8
to
537ed4d
Compare
Fix typo in docstring
537ed4d
to
5a600b2
Compare
No description provided.