21from abc
import abstractmethod
22from typing
import Optional
25from lsst.pipe.base
import Task
27from .isrFunctions
import checkFilter
28from .calibType
import IsrCalib
32 doRotatorAngleCorrection = Field(
40 doc=
"Filters that need straylight correction.",
46 """Remove stray light from instruments.
48 This is a dummy task to be retargeted
with an camera-specific version.
50 ConfigClass = StrayLightConfig
51 _DefaultName = "isrStrayLight"
54 """Check if stray light correction should be run.
63 def run(self, exposure, strayLightData):
64 """Correct stray light.
70 strayLightData : `object`, optional
71 An opaque object that contains any calibration data used to
72 correct for stray light.
74 raise NotImplementedError(
"Must be implemented by subclasses.")
76 def checkFilter(self, exposure):
77 """Check whether we should fringe-subtract the science exposure.
82 Exposure to check the filter of.
87 If True, then the exposure has a filter listed
in the
88 configuration,
and should have the fringe applied.
90 return checkFilter(exposure, self.config.filters, log=self.log)
94 """An abstract base class for rotator-dependent stray light information.
98 def evaluate(self, angle_start: Angle, angle_end: Optional[Angle] =
None):
99 """Get a stray light array for a range of rotator angles.
103 angle_begin : `float`
104 Instrument rotation angle at the start of the exposure.
105 angle_end : `float`, optional
106 Instrument rotation angle at the end of the exposure.
107 If not provided, the returned array will reflect a snapshot at
112 array : `numpy.ndarray`
113 A stray-light background image
for this exposure.
115 raise NotImplementedError(
"Must be implemented by subclasses.")
def evaluate(self, Angle angle_start, Optional[Angle] angle_end=None)
def check(self, exposure)
def run(self, exposure, strayLightData)