23__all__ = [
"AmpOffsetConfig",
"AmpOffsetTask"]
26import lsst.pipe.base
as pipeBase
31 """Configuration parameters for AmpOffsetTask.
33 ampEdgeInset = pexConfig.Field(
34 doc="Number of pixels the amp edge strip is inset from the amp edge. A thin strip of pixels running "
35 "parallel to the edge of the amp is used to characterize the average flux level at the amp edge.",
39 ampEdgeWidth = pexConfig.Field(
40 doc=
"Pixel width of the amp edge strip, starting at ampEdgeInset and extending inwards.",
44 ampEdgeMinFrac = pexConfig.Field(
45 doc=
"Minimum allowed fraction of viable pixel rows along an amp edge. No amp offset estimate will be "
46 "generated for amp edges that do not have at least this fraction of unmasked pixel rows.",
50 ampEdgeMaxOffset = pexConfig.Field(
51 doc=
"Maximum allowed amp offset ADU value. If a measured amp offset value is larger than this, the "
52 "result will be discarded and therefore not used to determine amp pedestal corrections.",
56 ampEdgeWindow = pexConfig.Field(
57 doc=
"Pixel size of the sliding window used to generate rolling average amp offset values.",
61 doBackground = pexConfig.Field(
62 doc=
"Estimate and subtract background prior to amp offset estimation?",
66 background = pexConfig.ConfigurableField(
67 doc=
"An initial background estimation step run prior to amp offset calculation.",
68 target=SubtractBackgroundTask,
70 doDetection = pexConfig.Field(
71 doc=
"Detect sources and update cloned exposure prior to amp offset estimation?",
75 detection = pexConfig.ConfigurableField(
76 doc=
"Source detection to add temporary detection footprints prior to amp offset calculation.",
77 target=SourceDetectionTask,
82 """Calculate and apply amp offset corrections to an exposure.
84 ConfigClass = AmpOffsetConfig
85 _DefaultName = "isrAmpOffset"
91 self.makeSubtask(
"background")
92 if self.config.doDetection:
93 self.makeSubtask(
"detection")
95 def run(self, exposure):
96 """Calculate amp offset values, determine corrective pedestals for each
97 amp, and update the input exposure
in-place. This task
is currently
not
98 implemented,
and should be retargeted by a camera specific version.
103 Exposure to be corrected
for any amp offsets.
105 raise NotImplementedError(
"Amp offset task should be retargeted by a camera specific version.")
def __init__(self, *args, **kwargs)