Skip to content

Commit

Permalink
Adjust fitPtcAndNonLinearity to return dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
plazas committed Feb 28, 2020
1 parent b929e0e commit 5e3ce6a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/lsst/cp/pipe/ptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,13 @@ def fitPtcAndNonLinearity(self, dataset, tableArray, ptcFitType):
'ASTIERAPPROXIMATION' to the PTC
tableArray : `np.array`
Look-up table array with size rows=nAmps and columns=ADU values
Returns
-------
dataset: `lsst.cp.pipe.ptc.PhotonTransferCurveDataset`
This is the same dataset as the input paramter, however, it has been modified
to include information such as the fit vectors and the fit parameters. See
the class `PhotonTransferCurveDatase`.
"""

def errFunc(p, x, y):
Expand Down Expand Up @@ -825,7 +832,7 @@ def errFunc(p, x, y):
dataset.nonLinearityResiduals[ampName] = linResidualNonLinearity
dataset.coefficientLinearizeSquared[ampName] = c0

return
return dataset

def plot(self, dataRef, dataset, ptcFitType):
dirname = dataRef.getUri(datasetType='cpPipePlotRoot', write=True)
Expand Down

0 comments on commit 5e3ce6a

Please sign in to comment.