Skip to content

Commit

Permalink
Add photodiode calib type.
Browse files Browse the repository at this point in the history
  • Loading branch information
czwa committed Oct 26, 2021
1 parent 24bfad2 commit b39540d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions python/lsst/pipe/tasks/ingestCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def getCalibType(self, filename):
obstype = "crosstalk"
elif "BFK" in obstype:
obstype = "bfk"
elif "photodiode" in obstype:
obstype = 'photodiode'
return obstype

def getDestination(self, butler, info, filename):
Expand All @@ -77,14 +79,15 @@ def getDestination(self, butler, info, filename):
class CalibsRegisterConfig(RegisterConfig):
"""Configuration for the CalibsRegisterTask"""
tables = ListField(dtype=str, default=["bias", "dark", "flat", "fringe", "sky", "defects", "qe_curve",
"linearizer", "crosstalk", "bfk"], doc="Names of tables")
"linearizer", "crosstalk", "bfk", "photodiode"],
doc="Names of tables")
calibDate = Field(dtype=str, default="calibDate", doc="Name of column for calibration date")
validStart = Field(dtype=str, default="validStart", doc="Name of column for validity start")
validEnd = Field(dtype=str, default="validEnd", doc="Name of column for validity stop")
detector = ListField(dtype=str, default=["filter", "ccd"],
doc="Columns that identify individual detectors")
validityUntilSuperseded = ListField(dtype=str, default=["defects", "qe_curve", "linearizer", "crosstalk",
"bfk"],
"bfk", "photodiode"],
doc="Tables for which to set validity for a calib from when it is "
"taken until it is superseded by the next; validity in other tables "
"is calculated by applying the validity range.")
Expand Down
5 changes: 3 additions & 2 deletions python/lsst/pipe/tasks/read_curated_calibs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lsst.meas.algorithms.simple_curve import Curve
from lsst.ip.isr import (Linearizer, CrosstalkCalib, Defects, BrighterFatterKernel)
from lsst.ip.isr import (Linearizer, CrosstalkCalib, Defects, BrighterFatterKernel, PhotodiodeCalib)

import os
import glob
Expand All @@ -26,7 +26,8 @@ def read_one_chip(root, chip_name, chip_id):
The key is the validity start time as a `datetime` object.
"""
factory_map = {'qe_curve': Curve, 'defects': Defects, 'linearizer': Linearizer,
'crosstalk': CrosstalkCalib, 'bfk': BrighterFatterKernel}
'crosstalk': CrosstalkCalib, 'bfk': BrighterFatterKernel,
'photodiode': PhotodiodeCalib, }
files = []
extensions = (".ecsv", ".yaml")
for ext in extensions:
Expand Down

0 comments on commit b39540d

Please sign in to comment.