LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
lsst.ip.isr.linearize.Linearizer Class Reference
Inheritance diagram for lsst.ip.isr.linearize.Linearizer:
lsst.ip.isr.calibType.IsrCalib

Public Member Functions

 __init__ (self, table=None, **kwargs)
 
 updateMetadata (self, setDate=False, **kwargs)
 
 fromDetector (self, detector)
 
 fromDict (cls, dictionary)
 
 toDict (self)
 
 fromTable (cls, tableList)
 
 toTable (self)
 
 getLinearityTypeByName (self, linearityTypeName)
 
 validate (self, detector=None, amplifier=None)
 
 applyLinearity (self, image, detector=None, log=None)
 

Public Attributes

 hasLinearity
 
 override
 
 ampNames
 
 linearityCoeffs
 
 linearityType
 
 linearityBBox
 
 fitParams
 
 fitParamsErr
 
 fitChiSq
 
 fitResiduals
 
 linearFit
 
 tableData
 

Protected Attributes

 _detectorName
 
 _detectorSerial
 
 _detectorId
 

Static Protected Attributes

str _OBSTYPE = "LINEARIZER"
 
str _SCHEMA = 'Gen3 Linearizer'
 
float _VERSION = 1.1
 

Detailed Description

Parameter set for linearization.

These parameters are included in `lsst.afw.cameraGeom.Amplifier`, but
should be accessible externally to allow for testing.

Parameters
----------
table : `numpy.array`, optional
    Lookup table; a 2-dimensional array of floats:

    - one row for each row index (value of coef[0] in the amplifier)
    - one column for each image value

    To avoid copying the table the last index should vary fastest
    (numpy default "C" order)
detector : `lsst.afw.cameraGeom.Detector`, optional
    Detector object.  Passed to self.fromDetector() on init.
log : `logging.Logger`, optional
    Logger to handle messages.
kwargs : `dict`, optional
    Other keyword arguments to pass to the parent init.

Raises
------
RuntimeError
    Raised if the supplied table is not 2D, or if the table has fewer
    columns than rows (indicating that the indices are swapped).

Notes
-----
The linearizer attributes stored are:

hasLinearity : `bool`
    Whether a linearity correction is defined for this detector.
override : `bool`
    Whether the detector parameters should be overridden.
ampNames : `list` [`str`]
    List of amplifier names to correct.
linearityCoeffs : `dict` [`str`, `numpy.array`]
    Coefficients to use in correction.  Indexed by amplifier
    names.  The format of the array depends on the type of
    correction to apply.
linearityType : `dict` [`str`, `str`]
    Type of correction to use, indexed by amplifier names.
linearityBBox : `dict` [`str`, `lsst.geom.Box2I`]
    Bounding box the correction is valid over, indexed by
    amplifier names.
fitParams : `dict` [`str`, `numpy.array`], optional
    Linearity fit parameters used to construct the correction
    coefficients, indexed as above.
fitParamsErr : `dict` [`str`, `numpy.array`], optional
    Uncertainty values of the linearity fit parameters used to
    construct the correction coefficients, indexed as above.
fitChiSq : `dict` [`str`, `float`], optional
    Chi-squared value of the linearity fit, indexed as above.
fitResiduals : `dict` [`str`, `numpy.array`], optional
    Residuals of the fit, indexed as above. Used for
    calculating photdiode corrections
linearFit : The linear fit to the low flux region of the curve.
    [intercept, slope].
tableData : `numpy.array`, optional
    Lookup table data for the linearity correction.

Definition at line 39 of file linearize.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.isr.linearize.Linearizer.__init__ ( self,
table = None,
** kwargs )

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 107 of file linearize.py.

107 def __init__(self, table=None, **kwargs):
108 self.hasLinearity = False
109 self.override = False
110
111 self.ampNames = list()
112 self.linearityCoeffs = dict()
113 self.linearityType = dict()
114 self.linearityBBox = dict()
115 self.fitParams = dict()
116 self.fitParamsErr = dict()
117 self.fitChiSq = dict()
118 self.fitResiduals = dict()
119 self.linearFit = dict()
120 self.tableData = None
121 if table is not None:
122 if len(table.shape) != 2:
123 raise RuntimeError("table shape = %s; must have two dimensions" % (table.shape,))
124 if table.shape[1] < table.shape[0]:
125 raise RuntimeError("table shape = %s; indices are switched" % (table.shape,))
126 self.tableData = np.array(table, order="C")
127
128 super().__init__(**kwargs)
129 self.requiredAttributes.update(['hasLinearity', 'override',
130 'ampNames',
131 'linearityCoeffs', 'linearityType', 'linearityBBox',
132 'fitParams', 'fitParamsErr', 'fitChiSq',
133 'fitResiduals', 'linearFit', 'tableData'])
134

Member Function Documentation

◆ applyLinearity()

lsst.ip.isr.linearize.Linearizer.applyLinearity ( self,
image,
detector = None,
log = None )
Apply the linearity to an image.

If the linearity parameters are populated, use those,
otherwise use the values from the detector.

Parameters
----------
image : `~lsst.afw.image.image`
    Image to correct.
detector : `~lsst.afw.cameraGeom.detector`
    Detector to use for linearity parameters if not already
    populated.
log : `~logging.Logger`, optional
    Log object to use for logging.

Definition at line 451 of file linearize.py.

451 def applyLinearity(self, image, detector=None, log=None):
452 """Apply the linearity to an image.
453
454 If the linearity parameters are populated, use those,
455 otherwise use the values from the detector.
456
457 Parameters
458 ----------
459 image : `~lsst.afw.image.image`
460 Image to correct.
461 detector : `~lsst.afw.cameraGeom.detector`
462 Detector to use for linearity parameters if not already
463 populated.
464 log : `~logging.Logger`, optional
465 Log object to use for logging.
466 """
467 if log is None:
468 log = self.log
469 if detector and not self.hasLinearity:
470 self.fromDetector(detector)
471
472 self.validate(detector)
473
474 numAmps = 0
475 numLinearized = 0
476 numOutOfRange = 0
477 for ampName in self.linearityType.keys():
478 linearizer = self.getLinearityTypeByName(self.linearityType[ampName])
479 numAmps += 1
480 if linearizer is not None:
481 ampView = image.Factory(image, self.linearityBBox[ampName])
482 success, outOfRange = linearizer()(ampView, **{'coeffs': self.linearityCoeffs[ampName],
483 'table': self.tableData,
484 'log': self.log})
485 numOutOfRange += outOfRange
486 if success:
487 numLinearized += 1
488 elif log is not None:
489 log.warning("Amplifier %s did not linearize.",
490 ampName)
491 return Struct(
492 numAmps=numAmps,
493 numLinearized=numLinearized,
494 numOutOfRange=numOutOfRange
495 )
496
497

◆ fromDetector()

lsst.ip.isr.linearize.Linearizer.fromDetector ( self,
detector )
Read linearity parameters from a detector.

Parameters
----------
detector : `lsst.afw.cameraGeom.detector`
    Input detector with parameters to use.

Returns
-------
calib : `lsst.ip.isr.Linearizer`
    The calibration constructed from the detector.

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 155 of file linearize.py.

155 def fromDetector(self, detector):
156 """Read linearity parameters from a detector.
157
158 Parameters
159 ----------
160 detector : `lsst.afw.cameraGeom.detector`
161 Input detector with parameters to use.
162
163 Returns
164 -------
165 calib : `lsst.ip.isr.Linearizer`
166 The calibration constructed from the detector.
167 """
168 self._detectorName = detector.getName()
169 self._detectorSerial = detector.getSerial()
170 self._detectorId = detector.getId()
171 self.hasLinearity = True
172
173 # Do not translate Threshold, Maximum, Units.
174 for amp in detector.getAmplifiers():
175 ampName = amp.getName()
176 self.ampNames.append(ampName)
177 self.linearityType[ampName] = amp.getLinearityType()
178 self.linearityCoeffs[ampName] = amp.getLinearityCoeffs()
179 self.linearityBBox[ampName] = amp.getBBox()
180
181 return self
182

◆ fromDict()

lsst.ip.isr.linearize.Linearizer.fromDict ( cls,
dictionary )
Construct a calibration from a dictionary of properties

Parameters
----------
dictionary : `dict`
    Dictionary of properties

Returns
-------
calib : `lsst.ip.isr.Linearity`
    Constructed calibration.

Raises
------
RuntimeError
    Raised if the supplied dictionary is for a different
    calibration.

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 184 of file linearize.py.

184 def fromDict(cls, dictionary):
185 """Construct a calibration from a dictionary of properties
186
187 Parameters
188 ----------
189 dictionary : `dict`
190 Dictionary of properties
191
192 Returns
193 -------
194 calib : `lsst.ip.isr.Linearity`
195 Constructed calibration.
196
197 Raises
198 ------
199 RuntimeError
200 Raised if the supplied dictionary is for a different
201 calibration.
202 """
203
204 calib = cls()
205
206 if calib._OBSTYPE != dictionary['metadata']['OBSTYPE']:
207 raise RuntimeError(f"Incorrect linearity supplied. Expected {calib._OBSTYPE}, "
208 f"found {dictionary['metadata']['OBSTYPE']}")
209
210 calib.setMetadata(dictionary['metadata'])
211
212 calib.hasLinearity = dictionary.get('hasLinearity',
213 dictionary['metadata'].get('HAS_LINEARITY', False))
214 calib.override = dictionary.get('override', True)
215
216 if calib.hasLinearity:
217 for ampName in dictionary['amplifiers']:
218 amp = dictionary['amplifiers'][ampName]
219 calib.ampNames.append(ampName)
220 calib.linearityCoeffs[ampName] = np.array(amp.get('linearityCoeffs', [0.0]))
221 calib.linearityType[ampName] = amp.get('linearityType', 'None')
222 calib.linearityBBox[ampName] = amp.get('linearityBBox', None)
223
224 calib.fitParams[ampName] = np.array(amp.get('fitParams', [0.0]))
225 calib.fitParamsErr[ampName] = np.array(amp.get('fitParamsErr', [0.0]))
226 calib.fitChiSq[ampName] = amp.get('fitChiSq', np.nan)
227 calib.fitResiduals[ampName] = np.array(amp.get('fitResiduals', [0.0]))
228 calib.linearFit[ampName] = np.array(amp.get('linearFit', [0.0]))
229
230 calib.tableData = dictionary.get('tableData', None)
231 if calib.tableData:
232 calib.tableData = np.array(calib.tableData)
233
234 return calib
235

◆ fromTable()

lsst.ip.isr.linearize.Linearizer.fromTable ( cls,
tableList )
Read linearity from a FITS file.

This method uses the `fromDict` method to create the
calibration, after constructing an appropriate dictionary from
the input tables.

Parameters
----------
tableList : `list` [`astropy.table.Table`]
    afwTable read from input file name.

Returns
-------
linearity : `~lsst.ip.isr.linearize.Linearizer``
    Linearity parameters.

Notes
-----
The method reads a FITS file with 1 or 2 extensions. The metadata is
read from the header of extension 1, which must exist.  Then the table
is loaded, and  the ['AMPLIFIER_NAME', 'TYPE', 'COEFFS', 'BBOX_X0',
'BBOX_Y0', 'BBOX_DX', 'BBOX_DY'] columns are read and used to set each
dictionary by looping over rows.
Extension 2 is then attempted to read in the try block (which only
exists for lookup tables). It has a column named 'LOOKUP_VALUES' that
contains a vector of the lookup entries in each row.

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 267 of file linearize.py.

267 def fromTable(cls, tableList):
268 """Read linearity from a FITS file.
269
270 This method uses the `fromDict` method to create the
271 calibration, after constructing an appropriate dictionary from
272 the input tables.
273
274 Parameters
275 ----------
276 tableList : `list` [`astropy.table.Table`]
277 afwTable read from input file name.
278
279 Returns
280 -------
281 linearity : `~lsst.ip.isr.linearize.Linearizer``
282 Linearity parameters.
283
284 Notes
285 -----
286 The method reads a FITS file with 1 or 2 extensions. The metadata is
287 read from the header of extension 1, which must exist. Then the table
288 is loaded, and the ['AMPLIFIER_NAME', 'TYPE', 'COEFFS', 'BBOX_X0',
289 'BBOX_Y0', 'BBOX_DX', 'BBOX_DY'] columns are read and used to set each
290 dictionary by looping over rows.
291 Extension 2 is then attempted to read in the try block (which only
292 exists for lookup tables). It has a column named 'LOOKUP_VALUES' that
293 contains a vector of the lookup entries in each row.
294 """
295 coeffTable = tableList[0]
296
297 metadata = coeffTable.meta
298 inDict = dict()
299 inDict['metadata'] = metadata
300 inDict['hasLinearity'] = metadata.get('HAS_LINEARITY', False)
301 inDict['amplifiers'] = dict()
302
303 for record in coeffTable:
304 ampName = record['AMPLIFIER_NAME']
305
306 fitParams = record['FIT_PARAMS'] if 'FIT_PARAMS' in record.columns else np.array([0.0])
307 fitParamsErr = record['FIT_PARAMS_ERR'] if 'FIT_PARAMS_ERR' in record.columns else np.array([0.0])
308 fitChiSq = record['RED_CHI_SQ'] if 'RED_CHI_SQ' in record.columns else np.nan
309 fitResiduals = record['FIT_RES'] if 'FIT_RES' in record.columns else np.array([0.0])
310 linearFit = record['LIN_FIT'] if 'LIN_FIT' in record.columns else np.array([0.0])
311
312 inDict['amplifiers'][ampName] = {
313 'linearityType': record['TYPE'],
314 'linearityCoeffs': record['COEFFS'],
315 'linearityBBox': Box2I(Point2I(record['BBOX_X0'], record['BBOX_Y0']),
316 Extent2I(record['BBOX_DX'], record['BBOX_DY'])),
317 'fitParams': fitParams,
318 'fitParamsErr': fitParamsErr,
319 'fitChiSq': fitChiSq,
320 'fitResiduals': fitResiduals,
321 'linearFit': linearFit,
322 }
323
324 if len(tableList) > 1:
325 tableData = tableList[1]
326 inDict['tableData'] = [record['LOOKUP_VALUES'] for record in tableData]
327
328 return cls().fromDict(inDict)
329

◆ getLinearityTypeByName()

lsst.ip.isr.linearize.Linearizer.getLinearityTypeByName ( self,
linearityTypeName )
Determine the linearity class to use from the type name.

Parameters
----------
linearityTypeName : str
    String name of the linearity type that is needed.

Returns
-------
linearityType : `~lsst.ip.isr.linearize.LinearizeBase`
    The appropriate linearity class to use.  If no matching class
    is found, `None` is returned.

Definition at line 367 of file linearize.py.

367 def getLinearityTypeByName(self, linearityTypeName):
368 """Determine the linearity class to use from the type name.
369
370 Parameters
371 ----------
372 linearityTypeName : str
373 String name of the linearity type that is needed.
374
375 Returns
376 -------
377 linearityType : `~lsst.ip.isr.linearize.LinearizeBase`
378 The appropriate linearity class to use. If no matching class
379 is found, `None` is returned.
380 """
381 for t in [LinearizeLookupTable,
382 LinearizeSquared,
383 LinearizePolynomial,
384 LinearizeProportional,
385 LinearizeSpline,
386 LinearizeNone]:
387 if t.LinearityType == linearityTypeName:
388 return t
389 return None
390

◆ toDict()

lsst.ip.isr.linearize.Linearizer.toDict ( self)
Return linearity parameters as a dict.

Returns
-------
outDict : `dict`:

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 236 of file linearize.py.

236 def toDict(self):
237 """Return linearity parameters as a dict.
238
239 Returns
240 -------
241 outDict : `dict`:
242 """
243 self.updateMetadata()
244
245 outDict = {'metadata': self.getMetadata(),
246 'detectorName': self._detectorName,
247 'detectorSerial': self._detectorSerial,
248 'detectorId': self._detectorId,
249 'hasTable': self.tableData is not None,
250 'amplifiers': dict(),
251 }
252 for ampName in self.linearityType:
253 outDict['amplifiers'][ampName] = {'linearityType': self.linearityType[ampName],
254 'linearityCoeffs': self.linearityCoeffs[ampName].tolist(),
255 'linearityBBox': self.linearityBBox[ampName],
256 'fitParams': self.fitParams[ampName].tolist(),
257 'fitParamsErr': self.fitParamsErr[ampName].tolist(),
258 'fitChiSq': self.fitChiSq[ampName],
259 'fitResiduals': self.fitResiduals[ampName].tolist(),
260 'linearFit': self.linearFit[ampName].tolist()}
261 if self.tableData is not None:
262 outDict['tableData'] = self.tableData.tolist()
263
264 return outDict
265

◆ toTable()

lsst.ip.isr.linearize.Linearizer.toTable ( self)
Construct a list of tables containing the information in this
calibration.

The list of tables should create an identical calibration
after being passed to this class's fromTable method.

Returns
-------
tableList : `list` [`astropy.table.Table`]
    List of tables containing the linearity calibration
    information.

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 330 of file linearize.py.

330 def toTable(self):
331 """Construct a list of tables containing the information in this
332 calibration.
333
334 The list of tables should create an identical calibration
335 after being passed to this class's fromTable method.
336
337 Returns
338 -------
339 tableList : `list` [`astropy.table.Table`]
340 List of tables containing the linearity calibration
341 information.
342 """
343
344 tableList = []
345 self.updateMetadata()
346 catalog = Table([{'AMPLIFIER_NAME': ampName,
347 'TYPE': self.linearityType[ampName],
348 'COEFFS': self.linearityCoeffs[ampName],
349 'BBOX_X0': self.linearityBBox[ampName].getMinX(),
350 'BBOX_Y0': self.linearityBBox[ampName].getMinY(),
351 'BBOX_DX': self.linearityBBox[ampName].getWidth(),
352 'BBOX_DY': self.linearityBBox[ampName].getHeight(),
353 'FIT_PARAMS': self.fitParams[ampName],
354 'FIT_PARAMS_ERR': self.fitParamsErr[ampName],
355 'RED_CHI_SQ': self.fitChiSq[ampName],
356 'FIT_RES': self.fitResiduals[ampName],
357 'LIN_FIT': self.linearFit[ampName],
358 } for ampName in self.ampNames])
359 catalog.meta = self.getMetadata().toDict()
360 tableList.append(catalog)
361
362 if self.tableData is not None:
363 catalog = Table([{'LOOKUP_VALUES': value} for value in self.tableData])
364 tableList.append(catalog)
365 return tableList
366

◆ updateMetadata()

lsst.ip.isr.linearize.Linearizer.updateMetadata ( self,
setDate = False,
** kwargs )
Update metadata keywords with new values.

This calls the base class's method after ensuring the required
calibration keywords will be saved.

Parameters
----------
setDate : `bool`, optional
    Update the CALIBDATE fields in the metadata to the current
    time. Defaults to False.
kwargs :
    Other keyword parameters to set in the metadata.

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 135 of file linearize.py.

135 def updateMetadata(self, setDate=False, **kwargs):
136 """Update metadata keywords with new values.
137
138 This calls the base class's method after ensuring the required
139 calibration keywords will be saved.
140
141 Parameters
142 ----------
143 setDate : `bool`, optional
144 Update the CALIBDATE fields in the metadata to the current
145 time. Defaults to False.
146 kwargs :
147 Other keyword parameters to set in the metadata.
148 """
149 kwargs['HAS_LINEARITY'] = self.hasLinearity
150 kwargs['OVERRIDE'] = self.override
151 kwargs['HAS_TABLE'] = self.tableData is not None
152
153 super().updateMetadata(setDate=setDate, **kwargs)
154

◆ validate()

lsst.ip.isr.linearize.Linearizer.validate ( self,
detector = None,
amplifier = None )
Validate linearity for a detector/amplifier.

Parameters
----------
detector : `lsst.afw.cameraGeom.Detector`, optional
    Detector to validate, along with its amplifiers.
amplifier : `lsst.afw.cameraGeom.Amplifier`, optional
    Single amplifier to validate.

Raises
------
RuntimeError
    Raised if there is a mismatch in linearity parameters, and
    the cameraGeom parameters are not being overridden.

Reimplemented from lsst.ip.isr.calibType.IsrCalib.

Definition at line 391 of file linearize.py.

391 def validate(self, detector=None, amplifier=None):
392 """Validate linearity for a detector/amplifier.
393
394 Parameters
395 ----------
396 detector : `lsst.afw.cameraGeom.Detector`, optional
397 Detector to validate, along with its amplifiers.
398 amplifier : `lsst.afw.cameraGeom.Amplifier`, optional
399 Single amplifier to validate.
400
401 Raises
402 ------
403 RuntimeError
404 Raised if there is a mismatch in linearity parameters, and
405 the cameraGeom parameters are not being overridden.
406 """
407 amplifiersToCheck = []
408 if detector:
409 if self._detectorName != detector.getName():
410 raise RuntimeError("Detector names don't match: %s != %s" %
411 (self._detectorName, detector.getName()))
412 if int(self._detectorId) != int(detector.getId()):
413 raise RuntimeError("Detector IDs don't match: %s != %s" %
414 (int(self._detectorId), int(detector.getId())))
415 # TODO: DM-38778: This check fails on LATISS due to an
416 # error in the camera configuration.
417 # if self._detectorSerial != detector.getSerial():
418 # raise RuntimeError(
419 # "Detector serial numbers don't match: %s != %s" %
420 # (self._detectorSerial, detector.getSerial()))
421 if len(detector.getAmplifiers()) != len(self.linearityCoeffs.keys()):
422 raise RuntimeError("Detector number of amps = %s does not match saved value %s" %
423 (len(detector.getAmplifiers()),
424 len(self.linearityCoeffs.keys())))
425 amplifiersToCheck.extend(detector.getAmplifiers())
426
427 if amplifier:
428 amplifiersToCheck.extend(amplifier)
429
430 for amp in amplifiersToCheck:
431 ampName = amp.getName()
432 if ampName not in self.linearityCoeffs.keys():
433 raise RuntimeError("Amplifier %s is not in linearity data" %
434 (ampName, ))
435 if amp.getLinearityType() != self.linearityType[ampName]:
436 if self.override:
437 self.log.warning("Overriding amplifier defined linearityType (%s) for %s",
438 self.linearityType[ampName], ampName)
439 else:
440 raise RuntimeError("Amplifier %s type %s does not match saved value %s" %
441 (ampName, amp.getLinearityType(), self.linearityType[ampName]))
442 if (amp.getLinearityCoeffs().shape != self.linearityCoeffs[ampName].shape or not
443 np.allclose(amp.getLinearityCoeffs(), self.linearityCoeffs[ampName], equal_nan=True)):
444 if self.override:
445 self.log.warning("Overriding amplifier defined linearityCoeffs (%s) for %s",
446 self.linearityCoeffs[ampName], ampName)
447 else:
448 raise RuntimeError("Amplifier %s coeffs %s does not match saved value %s" %
449 (ampName, amp.getLinearityCoeffs(), self.linearityCoeffs[ampName]))
450

Member Data Documentation

◆ _detectorId

lsst.ip.isr.linearize.Linearizer._detectorId
protected

Definition at line 170 of file linearize.py.

◆ _detectorName

lsst.ip.isr.linearize.Linearizer._detectorName
protected

Definition at line 168 of file linearize.py.

◆ _detectorSerial

lsst.ip.isr.linearize.Linearizer._detectorSerial
protected

Definition at line 169 of file linearize.py.

◆ _OBSTYPE

str lsst.ip.isr.linearize.Linearizer._OBSTYPE = "LINEARIZER"
staticprotected

Definition at line 103 of file linearize.py.

◆ _SCHEMA

str lsst.ip.isr.linearize.Linearizer._SCHEMA = 'Gen3 Linearizer'
staticprotected

Definition at line 104 of file linearize.py.

◆ _VERSION

float lsst.ip.isr.linearize.Linearizer._VERSION = 1.1
staticprotected

Definition at line 105 of file linearize.py.

◆ ampNames

lsst.ip.isr.linearize.Linearizer.ampNames

Definition at line 111 of file linearize.py.

◆ fitChiSq

lsst.ip.isr.linearize.Linearizer.fitChiSq

Definition at line 117 of file linearize.py.

◆ fitParams

lsst.ip.isr.linearize.Linearizer.fitParams

Definition at line 115 of file linearize.py.

◆ fitParamsErr

lsst.ip.isr.linearize.Linearizer.fitParamsErr

Definition at line 116 of file linearize.py.

◆ fitResiduals

lsst.ip.isr.linearize.Linearizer.fitResiduals

Definition at line 118 of file linearize.py.

◆ hasLinearity

lsst.ip.isr.linearize.Linearizer.hasLinearity

Definition at line 108 of file linearize.py.

◆ linearFit

lsst.ip.isr.linearize.Linearizer.linearFit

Definition at line 119 of file linearize.py.

◆ linearityBBox

lsst.ip.isr.linearize.Linearizer.linearityBBox

Definition at line 114 of file linearize.py.

◆ linearityCoeffs

lsst.ip.isr.linearize.Linearizer.linearityCoeffs

Definition at line 112 of file linearize.py.

◆ linearityType

lsst.ip.isr.linearize.Linearizer.linearityType

Definition at line 113 of file linearize.py.

◆ override

lsst.ip.isr.linearize.Linearizer.override

Definition at line 109 of file linearize.py.

◆ tableData

lsst.ip.isr.linearize.Linearizer.tableData

Definition at line 120 of file linearize.py.


The documentation for this class was generated from the following file: