Skip to content

Commit

Permalink
Add calib- DataProductName configs
Browse files Browse the repository at this point in the history
This is useful for using community pipeline bias and flats
with obs_decam, which are called cpBias and cpFlat. For
completeness, we include darkDataProductName too.
  • Loading branch information
mrawls committed Mar 23, 2018
1 parent a176276 commit c17ebf1
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions python/lsst/ip/isr/isrTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ class IsrTaskConfig(pexConfig.Config):
doc="Persist postISRCCD?",
default=True,
)
biasDataProductName = pexConfig.Field(
dtype=str,
doc="Name of the bias data product",
default="bias",
)
darkDataProductName = pexConfig.Field(
dtype=str,
doc="Name of the dark data product",
default="dark",
)
flatDataProductName = pexConfig.Field(
dtype=str,
doc="Name of the flat data product",
default="flat",
)
assembleCcd = pexConfig.ConfigurableField(
target=AssembleCcdTask,
doc="CCD assembly task",
Expand Down Expand Up @@ -392,11 +407,14 @@ def readIsrData(self, dataRef, rawExposure):
"""
ccd = rawExposure.getDetector()

biasExposure = self.getIsrExposure(dataRef, "bias") if self.config.doBias else None
biasExposure = self.getIsrExposure(dataRef, self.config.biasDataProductName) \
if self.config.doBias else None
# immediate=True required for functors and linearizers are functors; see ticket DM-6515
linearizer = dataRef.get("linearizer", immediate=True) if self.doLinearize(ccd) else None
darkExposure = self.getIsrExposure(dataRef, "dark") if self.config.doDark else None
flatExposure = self.getIsrExposure(dataRef, "flat") if self.config.doFlat else None
darkExposure = self.getIsrExposure(dataRef, self.config.darkDataProductName) \
if self.config.doDark else None
flatExposure = self.getIsrExposure(dataRef, self.config.flatDataProductName) \
if self.config.doFlat else None
brighterFatterKernel = dataRef.get("brighterFatterKernel") if self.config.doBrighterFatter else None
defectList = dataRef.get("defects") if self.config.doDefect else None

Expand Down

0 comments on commit c17ebf1

Please sign in to comment.