15 """Overscan configurations applicable to a single amplifier."""
16 doSerialOverscan = pexConfig.Field(
18 doc=
"Do serial overscan subtraction?",
21 serialOverscanConfig = pexConfig.ConfigField(
22 dtype=SerialOverscanCorrectionTaskConfig,
23 doc=
"Serial overscan configuration.",
25 doParallelOverscanCrosstalk = pexConfig.Field(
27 doc=
"Apply crosstalk correction in parallel overscan region?",
30 doParallelOverscan = pexConfig.Field(
32 doc=
"Do parallel overscan subtraction?",
35 parallelOverscanConfig = pexConfig.ConfigField(
36 dtype=ParallelOverscanCorrectionTaskConfig,
37 doc=
"Parallel overscan configuration.",
52 """Turn this config into a simple string for hashing.
54 Only essential data for tracking is returned.
60 stringForHash = (f
"doSerial={self.doSerialOverscan} "
61 f
"serialFitType={self.serialOverscanConfig.fitType} "
62 f
"doParallelCrosstalk={self.doParallelOverscanCrosstalk} "
63 f
"doParallel={self.doParallelOverscan} "
64 f
"parallelFitType={self.parallelOverscanConfig.fitType}")
189 """Overscan configurations applicable to multiple detectors in
192 detectorRules = pexConfig.ConfigDictField(
193 doc=
"Detector level rules for overscan",
195 itemtype=OverscanDetectorConfig,
198 defaultDetectorConfig = pexConfig.ConfigField(
199 dtype=OverscanDetectorConfig,
200 doc=
"Default configuration for detectors.",
202 detectorRuleKeyType = pexConfig.ChoiceField(
203 doc=
"Detector rule key type.",
207 "NAME":
"DetectorRules has a key that is the detector name.",
208 "SERIAL":
"DetectorRules has a key that is the detector serial number.",
209 "ID":
"DetectorRules has a key that is the detector id number.",
215 """Check if any of the detector/amp configs have doSerialOverscan.
219 doAnySerialOverscan : `bool`
225 if detectorRule.doAnySerialOverscan:
232 """Check if any of the detector/amp configs have
237 doAnyParallelOverscan : `bool`
244 if detectorRule.doAnyParallelOverscan:
251 """Check if any of the detector/amp configs have
252 doParallelOverscanCrosstalk.
256 doAnyParallelOverscanCrosstalk : `bool`
263 if detectorRule.doAnyParallelOverscanCrosstalk:
269 """Get the OverscanDetectorConfig for a specific detector.
273 detector : `lsst.afw.cameraGeom.Detector`
277 overscanDetectorConfig : `OverscanDetectorConfig`
281 key = detector.getName()
283 key = detector.getSerial()
285 key = str(detector.getId())
292 return overscanDetectorConfig