Skip to content

Commit

Permalink
Propogate changes from PR #317
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKrughoff committed Nov 20, 2019
1 parent 798d97f commit 490edbc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions python/lsst/pipe/tasks/ingestStdTextCalibs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .ingestCalibs import IngestCalibsTask
from .ingestCalibs import IngestCalibsTask, IngestCalibsConfig
from .read_stdText_calibs import read_all
from lsst.pipe.base import InputOnlyArgumentParser

Expand All @@ -20,10 +20,17 @@ def __init__(self, *args, **kwargs):
self.add_argument("root", help="Root directory to scan for calibs.")


class IngestStdTextCalibsConfig(IngestCalibsConfig):
def setDefaults(self):
if "filter" in self.register.columns:
self.parse.defaults["filter"] = "NONE"


class IngestStdTextCalibsTask(IngestCalibsTask):
"""Task that generates registry for calibration images"""
ArgumentParser = IngestStdTextCalibsArgumentParser
_DefaultName = "ingestStdTextCalibs"
ConfigClass = IngestStdTextCalibsConfig

def run(self, args):
"""Ingest all defect files and add them to the registry"""
Expand All @@ -45,7 +52,5 @@ def run(self, args):
args.mode = 'move'
args.validity = None # Validity range is determined from the files
IngestCalibsTask.run(self, args)
except Exception:
raise(Exception)
finally:
shutil.rmtree(temp_dir)

0 comments on commit 490edbc

Please sign in to comment.