1 from __future__
import absolute_import, division, print_function
3 from lsst.pipe.base import ArgumentParser, ButlerInitializedTaskRunner, ConfigDatasetType
11 target=ProcessCcdTask, doc=
"CCD processing task")
13 doc=
"List of CCDs to ignore when processing")
14 ccdKey =
Field(dtype=str, default=
"ccd",
15 doc=
"DataId key corresponding to a single sensor")
19 """Run batches, and initialize Task using a butler""" 23 class SingleFrameDriverTask(BatchParallelTask):
24 """Process CCDs in parallel 26 ConfigClass = SingleFrameDriverConfig
27 _DefaultName =
"singleFrameDriver" 28 RunnerClass = SingleFrameTaskRunner
30 def __init__(self, butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None,
35 The psfRefObjLoader, astromRefObjLoader, photoRefObjLoader should 36 be an instance of LoadReferenceObjectsTasks that supplies an external 37 reference catalog. They may be None if the butler argument is 38 provided or the particular reference catalog is not required. 40 @param[in] butler The butler is passed to the refObjLoader constructor in case it is 41 needed. Ignored if the refObjLoader argument provides a loader directly. 42 @param[in] psfRefObjLoader Reference catalog loader for PSF determination. 43 @param[in] astromRefObjLoader Reference catalog loader for astrometric calibration. 44 @param[in] photoRefObjLoader Reference catalog loader for photometric calibration. 45 @param[in,out] kwargs other keyword arguments for lsst.ctrl.pool.BatchParallelTask 47 BatchParallelTask.__init__(self, *args, **kwargs)
49 self.
makeSubtask(
"processCcd", butler=butler, psfRefObjLoader=psfRefObjLoader,
50 astromRefObjLoader=astromRefObjLoader, photoRefObjLoader=photoRefObjLoader)
53 def _makeArgumentParser(cls, *args, **kwargs):
54 kwargs.pop(
"doBatch",
False)
56 parser.add_id_argument(
"--id",
58 name=
"processCcd.isr.datasetType"),
60 help=
"data ID, e.g. --id visit=12345 ccd=67")
64 """Process a single CCD, with scatter-gather-scatter using MPI. 67 self.
log.
warn(
"Ignoring %s: CCD in ignoreCcdList" %
71 with self.
logOperation(
"processing %s" % (sensorRef.dataId,)):
def makeSubtask(self, name, keyArgs)
def runDataRef(self, sensorRef)
daf::base::PropertySet * set
def __init__(self, butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None, args, kwargs)
Constructor.
def logOperation(self, operation, catch=False, trace=True)
Provide a context manager for logging an operation.