3 from lsst.pex.config
import Config, Field, ConfigurableField, ListField
8 writeSourceTable = ConfigurableField(
9 target=WriteSourceTableTask,
10 doc=
"Task to make parquet table for full src catalog",
12 transformSourceTable = ConfigurableField(
13 target=TransformSourceTableTask,
14 doc=
"Transform Source Table to DPDD specification",
16 ignoreCcdList = ListField(
19 doc=
"List of CCDs to ignore when processing",
24 doc=
"DataId key corresponding to a single sensor",
33 """Convert existing src tables to parquet Source Table 35 This driver can convert PDR2-era `src` tables that do not have 36 * local photo calib columns 39 * detect_isPrimary flags set.set 41 It is specialized for the 2021 HSC data release in which we will 42 not rerun singleFrameDriver but start the processing from FGCM. 44 Can be removed during after the Gen2 deprecation period. 46 ConfigClass = SourceTableDriverConfig
47 _DefaultName =
"sourceTableDriver" 48 RunnerClass = BatchTaskRunner
54 @param[in,out] kwargs other keyword arguments for lsst.ctrl.pool.BatchParallelTask 56 BatchParallelTask.__init__(self, *args, **kwargs)
58 self.makeSubtask(
"writeSourceTable")
59 self.makeSubtask(
"transformSourceTable")
62 def _makeArgumentParser(cls, *args, **kwargs):
63 kwargs.pop(
"doBatch",
False)
64 parser = ArgumentParser(name=
"sourceTableDriver", *args, **kwargs)
65 parser.add_id_argument(
"--id",
68 help=
"data ID, e.g. --id visit=12345 ccd=67")
72 """Process a single CCD 74 if sensorRef.dataId[self.config.ccdKey]
in self.
ignoreCcds:
75 self.log.warn(
"Ignoring %s: CCD in ignoreCcdList" %
79 with self.
logOperation(
"processing %s" % (sensorRef.dataId,)):
80 res = self.writeSourceTable.
runDataRef(sensorRef)
81 df = self.transformSourceTable.run(res.table,
82 funcs=self.transformSourceTable.getFunctors(),
83 dataId=sensorRef.dataId)
84 self.transformSourceTable.write(df, sensorRef)
87 def _getMetadataName(self):
88 """There's no metadata to write out"""
def runDataRef(self, sensorRef)
def __init__(self, args, kwargs)
Constructor.
def logOperation(self, operation, catch=False, trace=True)