Skip to content

Commit

Permalink
ingestCalibs: add sky calib
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulPrice committed Sep 25, 2017
1 parent d461ca2 commit 877bddd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lsst/pipe/tasks/ingestCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def getCalibType(self, filename):
obstype = "dark"
elif "fringe" in obstype:
obstype = "fringe"
elif "sky" in obstype:
obstype = "sky"
return obstype

def getDestination(self, butler, info, filename):
Expand All @@ -64,7 +66,7 @@ def getDestination(self, butler, info, filename):

class CalibsRegisterConfig(RegisterConfig):
"""Configuration for the CalibsRegisterTask"""
tables = ListField(dtype=str, default=["bias", "dark", "flat", "fringe"], doc="Names of tables")
tables = ListField(dtype=str, default=["bias", "dark", "flat", "fringe", "sky"], 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")
Expand Down Expand Up @@ -188,7 +190,7 @@ def __init__(self, *args, **kwargs):
self.add_argument("--create", action="store_true", help="Create new registry?")
self.add_argument("--validity", type=int, required=True, help="Calibration validity period (days)")
self.add_argument("--calibType", type=str, default=None,
choices=[None, "bias", "dark", "flat", "fringe", "defect"],
choices=[None, "bias", "dark", "flat", "fringe", "sky", "defect"],
help="Type of the calibration data to be ingested;" +
" if omitted, the type is determined from" +
" the file header information")
Expand Down

0 comments on commit 877bddd

Please sign in to comment.