Skip to content

Commit

Permalink
Enforce gain usage in CTI construction.
Browse files Browse the repository at this point in the history
  • Loading branch information
czwa committed Nov 16, 2023
1 parent df35531 commit 23a70e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pipelines/_ingredients/cpDeferredCharge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ tasks:
config:
connections.inputMeasurements: 'cpCtiStats'
connections.outputCalib: 'cpCtiCalib'
useGains: true
contracts:
- ctiIsr.doApplyGains == solveCti.useGains
8 changes: 7 additions & 1 deletion python/lsst/cp/pipe/deferredCharge.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ class CpCtiSolveConfig(pipeBase.PipelineTaskConfig,
doc="First and last overscan column to use for local offset effect.",
)

useGains = pexConfig.Field(
dtype=bool,
default=True,
doc="Use gains in calculation.",
)

maxSignalForCti = pexConfig.Field(
dtype=float,
default=10000.0,
Expand Down Expand Up @@ -179,7 +185,7 @@ def run(self, inputMeasurements, camera, inputDims):
detector = camera[detectorId]

# Initialize with detector.
calib = DeferredChargeCalib(camera=camera, detector=detector)
calib = DeferredChargeCalib(camera=camera, detector=detector, useGains=self.config.useGains)

localCalib = self.solveLocalOffsets(inputMeasurements, calib, detector)

Expand Down

0 comments on commit 23a70e9

Please sign in to comment.