示例#1
0
    def __init__(self, butler=None, schema=None, peakSchema=None, **kwargs):
        """Initialize the task.

        Keyword arguments (in addition to those forwarded to CmdLineTask.__init__):
         - schema: the schema of the merged detection catalog used as input to this one
         - peakSchema: the schema of the PeakRecords in the Footprints in the merged detection catalog
         - butler: a butler used to read the input schemas from disk, if schema or peakSchema is None

        The task will set its own self.schema attribute to the schema of the output measurement catalog.
        This will include all fields from the input schema, as well as additional fields for all the
        measurements.
        """
        CmdLineTask.__init__(self, **kwargs)
        if schema is None:
            assert butler is not None, "Neither butler nor schema is defined"
            schema = butler.get(self.config.coaddName + "Coadd_mergeDet_schema", immediate=True).schema
        self.schemaMapper = afwTable.SchemaMapper(schema)
        self.schemaMapper.addMinimalSchema(schema)
        self.schema = self.schemaMapper.getOutputSchema()
        self.algMetadata = PropertyList()
        if self.config.doDeblend:
            if peakSchema is None:
                assert butler is not None, "Neither butler nor peakSchema is defined"
                peakSchema = butler.get(self.config.coaddName + "Coadd_peak_schema", immediate=True).schema
            self.makeSubtask("deblend", schema=self.schema, peakSchema=peakSchema)
        self.makeSubtask("measurement", schema=self.schema, algMetadata=self.algMetadata)
        self.makeSubtask("setPrimaryFlags", schema=self.schema)
        self.makeSubtask("propagateFlags", schema=self.schema)
        self.makeSubtask("astrometry", schema=self.schema)
示例#2
0
    def __init__(self, butler=None, schema=None, **kwargs):
        """Initialize the task.

        Keyword arguments (in addition to those forwarded to CmdLineTask.__init__):
         - schema: the schema of the detection catalogs used as input to this one
         - butler: a butler used to read the input schema from disk, if schema is None

        Derived classes should use the getInputSchema() method to handle the additional
        arguments and retreive the actual input schema.
        """
        CmdLineTask.__init__(self, **kwargs)
示例#3
0
    def __init__(self, schema=None, **kwargs):
        """Initialize the task.

        Keyword arguments (in addition to those forwarded to CmdLineTask.__init__):
         - schema: the initial schema for the output catalog, modified-in place to include all
                   fields set by this task.  If None, the source minimal schema will be used.
        """
        CmdLineTask.__init__(self, **kwargs)
        if schema is None:
            schema = afwTable.SourceTable.makeMinimalSchema()
        self.schema = schema
        self.makeSubtask("detection", schema=self.schema)
示例#4
0
 def __init__(self, **kwds):
     CmdLineTask.__init__(self, **kwds)
     metricsFile = self.config.metricsFile
     if metricsFile is None:
         metricsFile = os.path.join(getPackageDir('validate_drp'), 'etc', 'metrics.yaml')
     self.metrics = load_metrics(metricsFile)
示例#5
0
 def __init__(self, *args, **kwargs):
     CmdLineTask.__init__(self, *args, **kwargs)
示例#6
0
 def __init__(self, *args, **kwargs):
     CmdLineTask.__init__(self, *args, **kwargs)
     self._failures = 0
     atexit.register(self.finalise)
示例#7
0
 def __init__(self, butler=None, schema=None, **kwargs):
     # It is a shame that this class can't use the default init for CmdLineTask
     # But to do so would require its own special task runner, which is many
     # more lines of specialization, so this is how it is for now
     CmdLineTask.__init__(self, **kwargs)
示例#8
0
 def __del__(self):
     if self._failures > 0:
         self.log.fatal("%d tests failed")
         sys.exit(1)
     CmdLineTask.__del__(self)
 def __init__(self, *args, **kwargs):
     CmdLineTask.__init__(self, *args, **kwargs)
     self.makeSubtask("isr")
示例#10
0
 def __init__(self, *args, **kwargs):
     CmdLineTask.__init__(self, *args, **kwargs)
     self.makeSubtask("isr")
示例#11
0
 def __init__(self, *args, **kwargs):
     CmdLineTask.__init__(self, *args, **kwargs)
     self.makeSubtask("isr")
     self.calib = CrosstalkCalib()