23 from abc
import ABC, abstractmethod
24 from typing
import Optional
26 from lsst.pex.config
import Config, Field
32 doRotatorAngleCorrection = Field(
40 """Remove stray light from instruments. 42 This is a dummy task to be retargeted with an camera-specific version. 44 ConfigClass = StrayLightConfig
45 _DefaultName =
"isrStrayLight" 48 """Read and return calibration products relevant for correcting 49 stray light in the given exposure. 53 dataRef : `daf.persistence.butlerSubset.ButlerDataRef` 54 Butler reference of the detector data to be processed 55 rawExposure : `afw.image.Exposure` 56 The raw exposure that will later be corrected with the 57 retrieved calibration data; should not be modified in this 62 straylightData : `object`, optional 63 An opaque object that should be passed as the second argument to 64 the `run` method. If `None`, no stray light correction will be 65 performed for the given image. Any other object (e.g. `True`) 66 may be used to signal that stray light correction should be 67 performed even if there is nothing to read. 71 This method will be called only when `IsrTask` is run by the Gen2 72 Middleware (i.e. CmdLineTask). 76 def run(self, exposure, strayLightData):
77 """Correct stray light. 81 exposure : `lsst.afw.image.Exposure` 83 strayLightData : `object`, optional 84 An opaque object that contains any calibration data used to 85 correct for stray light. 87 raise NotImplementedError(
"Must be implemented by subclasses.")
91 """An abstract base class for rotator-dependent stray light information. 95 def evaluate(self, angle_start: Angle, angle_end: Optional[Angle] =
None):
96 """Get a stray light array for a range of rotator angles. 100 angle_begin : `float` 101 Instrument rotation angle at the start of the exposure. 102 angle_end : `float`, optional 103 Instrument rotation angle at the end of the exposure. 104 If not provided, the returned array will reflect a snapshot at 109 array : `numpy.ndarray` 110 A stray-light background image for this exposure. 112 raise NotImplementedError(
"Must be implemented by subclasses.")
def run(self, exposure, strayLightData)
def readIsrData(self, dataRef, rawExposure)