Skip to content

Commit

Permalink
Catch NaN when FULLCOV fit fails
Browse files Browse the repository at this point in the history
  • Loading branch information
plazas committed Oct 29, 2020
1 parent 16d947b commit 8758c92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions python/lsst/cp/pipe/astierCovPtcFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,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]:
raise RuntimeError("Minimization failed: " + mesg)
self.covParams = paramsCov

return params
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/cp/pipe/ptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ def getOutputPtcDataCovAstier(self, dataset, covFits, covFitsNoB):
dataset.ptcFitPars[amp] = np.nan
dataset.ptcFitParsError[amp] = np.nan
dataset.ptcFitChiSq[amp] = np.nan
if amp in covFits:
if (amp in covFits and (covFits[amp].covParams is not None) and
(covFitsNoB[amp].covParams is not None)):
fit = covFits[amp]
fitNoB = covFitsNoB[amp]
# Save full covariances, covariances models, and their weights
Expand Down

0 comments on commit 8758c92

Please sign in to comment.