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-27185: ptc.py fails with ptcFitType=FULLCOVARIANCE #60

Merged
merged 9 commits into from Nov 10, 2020

Conversation

plazas
Copy link
Contributor

@plazas plazas commented Oct 16, 2020

No description provided.

@@ -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
Copy link
Contributor

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]:
Copy link
Contributor

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):
Copy link
Contributor

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.

@plazas plazas force-pushed the tickets/DM-27185 branch 2 times, most recently from 5f3a373 to 0f1b4c8 Compare November 9, 2020 23:11
Fix typo in docstring
@plazas plazas merged commit 64178ef into master Nov 10, 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