lsst.pipe.tasks  13.0-66-gfbf2f2ce+5
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.multiBand.MergeSourcesTask Class Reference

A base class for merging source catalogs. More...

Inheritance diagram for lsst.pipe.tasks.multiBand.MergeSourcesTask:
lsst.pipe.tasks.multiBand.MergeDetectionsTask lsst.pipe.tasks.multiBand.MergeMeasurementsTask

Public Member Functions

def getInputSchema (self, butler=None, schema=None)
 Obtain the input schema either directly or froma butler reference. More...
 
def __init__ (self, butler=None, schema=None, kwargs)
 Initialize the task. More...
 
def run (self, patchRefList)
 Merge coadd sources from multiple bands. More...
 
def readCatalog (self, patchRef)
 Read input catalog. More...
 
def mergeCatalogs (self, catalogs, patchRef)
 Merge multiple catalogs. More...
 
def write (self, patchRef, catalog)
 Write the output. More...
 
def writeMetadata (self, dataRefList)
 No metadata to write, and not sure how to write it for a list of dataRefs. More...
 

Static Public Attributes

 ConfigClass = MergeSourcesConfig
 
 RunnerClass = MergeSourcesRunner
 
 inputDataset = None
 
 outputDataset = None
 
 getSchemaCatalogs = None
 

Detailed Description

A base class for merging source catalogs.

Merging detections (MergeDetectionsTask) and merging measurements (MergeMeasurementsTask) are so similar that it makes sense to re-use the code, in the form of this abstract base class.

NB: Do not use this class directly. Instead use one of the child classes that inherit from MergeSourcesTask such as MergeDetectionsTask or MergeMeasurementsTask

Sub-classes should set the following class variables:

In addition, sub-classes must implement the mergeCatalogs method.

Definition at line 389 of file multiBand.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.__init__ (   self,
  butler = None,
  schema = None,
  kwargs 
)

Initialize the task.

Keyword arguments (in addition to those forwarded to CmdLineTask.__init__):

Parameters
[in]schemathe schema of the detection catalogs used as input to this one
[in]butlera 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.

Definition at line 445 of file multiBand.py.

Member Function Documentation

◆ getInputSchema()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.getInputSchema (   self,
  butler = None,
  schema = None 
)

Obtain the input schema either directly or froma butler reference.

Parameters
[in]butlerbutler reference to obtain the input schema from
[in]schemathe input schema

Definition at line 432 of file multiBand.py.

◆ mergeCatalogs()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.mergeCatalogs (   self,
  catalogs,
  patchRef 
)

Merge multiple catalogs.

This function must be defined in all subclasses that inherit from MergeSourcesTask.

Parameters
[in]catalogsdict mapping filter name to source catalog
Returns
merged catalog

Definition at line 484 of file multiBand.py.

◆ readCatalog()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.readCatalog (   self,
  patchRef 
)

Read input catalog.

We read the input dataset provided by the 'inputDataset' class variable.

Parameters
[in]patchRefdata reference for patch
Returns
tuple consisting of the filter name and the catalog

Definition at line 469 of file multiBand.py.

◆ run()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.run (   self,
  patchRefList 
)

Merge coadd sources from multiple bands.

Calls mergeCatalogs which must be defined in subclasses that inherit from MergeSourcesTask.

Parameters
[in]patchRefListlist of data references for each filter

Definition at line 458 of file multiBand.py.

◆ write()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.write (   self,
  patchRef,
  catalog 
)

Write the output.

Parameters
[in]patchRefdata reference for patch
[in]catalogcatalog

We write as the dataset provided by the 'outputDataset' class variable.

Definition at line 495 of file multiBand.py.

◆ writeMetadata()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.writeMetadata (   self,
  dataRefList 
)

No metadata to write, and not sure how to write it for a list of dataRefs.

Definition at line 512 of file multiBand.py.

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.multiBand.MergeSourcesTask.ConfigClass = MergeSourcesConfig
static

Definition at line 411 of file multiBand.py.

◆ getSchemaCatalogs

lsst.pipe.tasks.multiBand.MergeSourcesTask.getSchemaCatalogs = None
static

Definition at line 415 of file multiBand.py.

◆ inputDataset

lsst.pipe.tasks.multiBand.MergeSourcesTask.inputDataset = None
static

Definition at line 413 of file multiBand.py.

◆ outputDataset

lsst.pipe.tasks.multiBand.MergeSourcesTask.outputDataset = None
static

Definition at line 414 of file multiBand.py.

◆ RunnerClass

lsst.pipe.tasks.multiBand.MergeSourcesTask.RunnerClass = MergeSourcesRunner
static

Definition at line 412 of file multiBand.py.


The documentation for this class was generated from the following file: