예제 #1
0
 def __init__(self, *args, **kwargs):
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.makeSubtask("select")
     self.makeSubtask("makeCoaddTempExp")
     self.makeSubtask("backgroundReference")
     self.makeSubtask("assembleCoadd")
     self.makeSubtask("detectCoaddSources")
예제 #2
0
 def __init__(self, *args, **kwargs):
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.makeSubtask("select")
     self.makeSubtask("makeCoaddTempExp")
     self.makeSubtask("backgroundReference")
     self.makeSubtask("assembleCoadd")
     self.makeSubtask("detectCoaddSources")
예제 #3
0
 def __init__(self, butler=None, schema=None, refObjLoader=None, **kwargs):
     """!
     @param[in] butler: the butler can be used to retrieve schema or passed to the refObjLoader constructor
         in case it is needed.
     @param[in] schema: the schema of the source detection catalog used as input.
     @param[in] refObjLoader: an instance of LoadReferenceObjectsTasks that supplies an external reference
         catalog.  May be None if the butler argument is provided or all steps requiring a reference
         catalog are disabled.
     """
     BatchPoolTask.__init__(self, **kwargs)
     if schema is None:
         assert butler is not None, "Butler not provided"
         schema = butler.get(self.config.coaddName + "Coadd_det_schema",
                             immediate=True).schema
     self.butler = butler
     self.makeSubtask("detectCoaddSources")
     self.makeSubtask("mergeCoaddDetections", schema=schema)
     self.makeSubtask("measureCoaddSources",
                      schema=afwTable.Schema(
                          self.mergeCoaddDetections.schema),
                      peakSchema=afwTable.Schema(
                          self.mergeCoaddDetections.merged.getPeakSchema()),
                      refObjLoader=refObjLoader,
                      butler=butler)
     self.makeSubtask("mergeCoaddMeasurements",
                      schema=afwTable.Schema(
                          self.measureCoaddSources.schema))
     self.makeSubtask("forcedPhotCoadd",
                      refSchema=afwTable.Schema(
                          self.mergeCoaddMeasurements.schema))
예제 #4
0
 def __init__(self, butler=None, **kwargs):
     """!
     @param[in] butler: the butler can be used to retrieve schema or passed to the refObjLoader
         constructor in case it is needed.
     """
     BatchPoolTask.__init__(self, **kwargs)
     self.butler = butler
     self.schema = afwTable.SourceTable.makeMinimalSchema()
예제 #5
0
 def __init__(self, reuse=tuple(), **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
     self.reuse = reuse
     self.makeSubtask("select")
     self.makeSubtask("makeCoaddTempExp", reuse=("makeCoaddTempExp" in self.reuse))
     self.makeSubtask("backgroundReference")
     self.makeSubtask("assembleCoadd")
     self.makeSubtask("detectCoaddSources")
예제 #6
0
 def __init__(self, butler=None, *args, **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
     self.butler = butler
     self.makeSubtask("isr")
     self.makeSubtask("warp")
     self.makeSubtask("snapCombine")
     self.makeSubtask("charImage")
     self.makeSubtask("calibrate", butler=butler)
     self.makeSubtask("forcedPhot", butler=butler)
 def __init__(self, butler=None, schema=None, **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
     if schema is None:
         assert butler is not None, "Butler not provided"
         schema = butler.get(self.config.coaddName + "Coadd_det_schema", immediate=True).schema
     self.butler = butler
     self.makeSubtask("mergeCoaddDetections", schema=schema)
     self.makeSubtask("measureCoaddSources", schema=afwTable.Schema(self.mergeCoaddDetections.schema),
                      peakSchema=afwTable.Schema(self.mergeCoaddDetections.merged.getPeakSchema()))
     self.makeSubtask("mergeCoaddMeasurements", schema=afwTable.Schema(self.measureCoaddSources.schema))
     self.makeSubtask("forcedPhotCoadd", refSchema=afwTable.Schema(self.mergeCoaddMeasurements.schema))
예제 #8
0
 def __init__(self, *args, **kwargs):
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.makeSubtask("isr")
     self.schema = afwTable.SourceTable.makeMinimalSchema()
     self.makeSubtask("installPsf")
     self.makeSubtask("detectAndMeasure", schema=self.schema)
     self.candidateKey = self.schema.addField(
         "hscPipeline_focus_candidate", type="Flag",
         doc=("Flag set if the source was a candidate for PSF determination, "
              "as determined by the star selector.")
     )
     self.makeSubtask("starSelector")
예제 #9
0
 def __init__(self, butler=None, **kwargs):
     """!
     @param[in] butler: the butler can be used to retrieve schema or passed to the refObjLoader constructor
         in case it is needed.
     @param[in] schema: the schema of the source detection catalog used as input.
     @param[in] refObjLoader: an instance of LoadReferenceObjectsTasks that supplies an external reference
         catalog.  May be None if the butler argument is provided or all steps requiring a reference
         catalog are disabled.
     """
     BatchPoolTask.__init__(self, **kwargs)
     self.butler = butler
     self.makeSubtask("measure")
예제 #10
0
 def __init__(self, reuse=tuple(), **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
     self.reuse = reuse
     self.makeSubtask("select")
     self.makeSubtask("makeCoaddTempExp",
                      reuse=("makeCoaddTempExp" in self.reuse))
     self.makeSubtask("backgroundReference")
     self.makeSubtask("assembleCoadd")
     self.makeSubtask("detectCoaddSources")
     if self.config.hasFakes:
         self.calexpType = "fakes_calexp"
     else:
         self.calexpType = "calexp"
예제 #11
0
 def __init__(self, butler=None, schema=None, refObjLoader=None, **kwargs):
     """!
     @param[in] butler: the butler can be used to retrieve schema or passed to the refObjLoader constructor
         in case it is needed.
     @param[in] schema: the schema of the source detection catalog used as input.
     @param[in] refObjLoader: an instance of LoadReferenceObjectsTasks that supplies an external reference
         catalog.  May be None if the butler argument is provided or all steps requiring a reference
         catalog are disabled.
     """
     BatchPoolTask.__init__(self, **kwargs)
     if schema is None:
         assert butler is not None, "Butler not provided"
         schema = butler.get(self.config.coaddName + "Coadd_det_schema", immediate=True).schema
     self.butler = butler
     self.makeSubtask("mergeCoaddDetections", schema=schema)
     self.makeSubtask("measureCoaddSources", schema=afwTable.Schema(self.mergeCoaddDetections.schema),
                      peakSchema=afwTable.Schema(self.mergeCoaddDetections.merged.getPeakSchema()),
                      refObjLoader=refObjLoader, butler=butler)
     self.makeSubtask("mergeCoaddMeasurements", schema=afwTable.Schema(self.measureCoaddSources.schema))
     self.makeSubtask("forcedPhotCoadd", refSchema=afwTable.Schema(self.mergeCoaddMeasurements.schema))
예제 #12
0
 def __init__(self, **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
     self.makeSubtask("processCosmo")
예제 #13
0
 def __init__(self, *args, **kwargs):
     BatchPoolTask.__init__(self, *args, **kwargs)
     self._storedButler = False  # Stored butler in the Pool? Doing this once increases efficiency
예제 #14
0
 def __init__(self, *args, **kwargs):
     """Constructor"""
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.makeSubtask("isr")
     self.makeSubtask("combination")
 def __init__(self, *args, **kwargs):
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.makeSubtask("sky")
     # Disposable schema suppresses warning from SourceDetectionTask.__init__
     self.makeSubtask("detection", schema=afwTable.Schema())
예제 #16
0
 def __init__(self, **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
예제 #17
0
 def __init__(self, *args, **kwargs):
     """Constructor"""
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.makeSubtask("isr")
     self.makeSubtask("combination")
예제 #18
0
 def __init__(self, **kwargs):
     BatchPoolTask.__init__(self, **kwargs)
     self.schema = afwTable.SourceTable.makeMinimalSchema()
     self.makeSubtask("readDataSim", schema=self.schema)
 def __init__(self, butler=None, *args, **kwargs):
     BatchPoolTask.__init__(self, *args, **kwargs)
     self.butler = butler
     self.makeSubtask("forced", butler=butler)
예제 #20
0
    def __init__(self,
                 butler=None,
                 schema=None,
                 refObjLoader=None,
                 reuse=tuple(),
                 **kwargs):
        """!
        @param[in] butler: the butler can be used to retrieve schema or passed to the refObjLoader constructor
            in case it is needed.
        @param[in] schema: the schema of the source detection catalog used as input.
        @param[in] refObjLoader: an instance of LoadReferenceObjectsTasks that supplies an external reference
            catalog.  May be None if the butler argument is provided or all steps requiring a reference
            catalog are disabled.
        """
        BatchPoolTask.__init__(self, **kwargs)
        if schema is None:
            assert butler is not None, "Butler not provided"
            schema = butler.get(self.config.coaddName + "Coadd_det_schema",
                                immediate=True).schema
        self.butler = butler
        self.reuse = tuple(reuse)
        self.makeSubtask("detectCoaddSources")
        self.makeSubtask("mergeCoaddDetections", schema=schema)
        if self.config.measureCoaddSources.inputCatalog.startswith(
                "deblended"):
            # Ensure that the output from deblendCoaddSources matches the input to measureCoaddSources
            self.measurementInput = self.config.measureCoaddSources.inputCatalog
            self.deblenderOutput = []
            if self.config.deblendCoaddSources.simultaneous:
                self.deblenderOutput.append("deblendedModel")
            else:
                self.deblenderOutput.append("deblendedFlux")
            if self.measurementInput not in self.deblenderOutput:
                err = "Measurement input '{0}' is not in the list of deblender output catalogs '{1}'"
                raise ValueError(
                    err.format(self.measurementInput, self.deblenderOutput))

            self.makeSubtask(
                "deblendCoaddSources",
                schema=afwTable.Schema(self.mergeCoaddDetections.schema),
                peakSchema=afwTable.Schema(
                    self.mergeCoaddDetections.merged.getPeakSchema()),
                butler=butler)
            measureInputSchema = afwTable.Schema(
                self.deblendCoaddSources.schema)
        else:
            measureInputSchema = afwTable.Schema(
                self.mergeCoaddDetections.schema)
        self.makeSubtask("measureCoaddSources",
                         schema=measureInputSchema,
                         peakSchema=afwTable.Schema(
                             self.mergeCoaddDetections.merged.getPeakSchema()),
                         refObjLoader=refObjLoader,
                         butler=butler)
        self.makeSubtask("mergeCoaddMeasurements",
                         schema=afwTable.Schema(
                             self.measureCoaddSources.schema))
        self.makeSubtask("forcedPhotCoadd",
                         refSchema=afwTable.Schema(
                             self.mergeCoaddMeasurements.schema))
        if self.config.hasFakes:
            self.coaddType = "fakes_" + self.config.coaddName
        else:
            self.coaddType = self.config.coaddName