lsst.pipe.tasks  16.0-27-g78173a71+3
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 lsst.pipe.tasks.dcrMultiBand.MergeDcrDetectionsTask lsst.pipe.tasks.dcrMultiBand.MergeDcrMeasurementsTask

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 runDataRef (self, patchRefList)
 Merge coadd sources from multiple bands. More...
 
def readCatalog (self, patchRef)
 Read input catalog. More...
 
def run (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 run method.

Definition at line 494 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 550 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 537 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 574 of file multiBand.py.

◆ run()

def lsst.pipe.tasks.multiBand.MergeSourcesTask.run (   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 589 of file multiBand.py.

◆ runDataRef()

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

Merge coadd sources from multiple bands.

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

Parameters
[in]patchRefListlist of data references for each filter

Definition at line 563 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 600 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 617 of file multiBand.py.

Member Data Documentation

◆ ConfigClass

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

Definition at line 516 of file multiBand.py.

◆ getSchemaCatalogs

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

Definition at line 520 of file multiBand.py.

◆ inputDataset

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

Definition at line 518 of file multiBand.py.

◆ outputDataset

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

Definition at line 519 of file multiBand.py.

◆ RunnerClass

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

Definition at line 517 of file multiBand.py.


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