lsst.pipe.tasks  13.0-56-g21e2fbf+3
 All Classes Namespaces Files Functions Variables Groups Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.multiBand.MergeDetectionsTask Class Reference

Merge coadd detections from multiple bands. More...

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

Public Member Functions

def __init__
 Initialize the merge detections task. More...
 
def mergeCatalogs
 Merge multiple catalogs. More...
 
def cullPeaks
 Attempt to remove garbage peaks (mostly on the outskirts of large blends). More...
 
def getSchemaCatalogs
 Return a dict of empty catalogs for each catalog dataset produced by this task. More...
 
def getSkySourceFootprints
 Return a list of Footprints of sky objects which don't overlap with anything in mergedList. More...
 
- Public Member Functions inherited from lsst.pipe.tasks.multiBand.MergeSourcesTask
def getInputSchema
 Obtain the input schema either directly or froma butler reference. More...
 
def __init__
 Initialize the task. More...
 
def run
 Merge coadd sources from multiple bands. More...
 
def readCatalog
 Read input catalog. More...
 
def mergeCatalogs
 Merge multiple catalogs. More...
 
def write
 Write the output. More...
 
def writeMetadata
 No metadata to write, and not sure how to write it for a list of dataRefs. More...
 

Public Attributes

 schema
 
 merged
 

Static Public Attributes

 ConfigClass = MergeDetectionsConfig
 
string inputDataset = "det"
 
string outputDataset = "mergeDet"
 
tuple makeIdFactory = _makeMakeIdFactory("MergedCoaddId")
 
- Static Public Attributes inherited from lsst.pipe.tasks.multiBand.MergeSourcesTask
 ConfigClass = MergeSourcesConfig
 
 RunnerClass = MergeSourcesRunner
 
 inputDataset = None
 
 outputDataset = None
 
 getSchemaCatalogs = None
 

Detailed Description

Merge coadd detections from multiple bands.

Contents

Description

Command-line task that merges sources detected in coadds of exposures obtained with different filters.

To perform photometry consistently across coadds in multiple filter bands, we create a master catalog of sources from all bands by merging the sources (peaks & footprints) detected in each coadd, while keeping track of which band each source originates in.

The catalog merge is performed by getMergedSourceCatalog. Spurious peaks detected around bright objects are culled as described in CullPeaksConfig_.

Inputs:
deepCoadd_det{tract,patch,filter}: SourceCatalog (only parent Footprints)
Outputs:
deepCoadd_mergeDet{tract,patch}: SourceCatalog (only parent Footprints)
Data Unit:
tract, patch

MergeDetectionsTask subclasses MergeSourcesTask.

Task initialisation

Initialize the merge detections task. A FootprintMergeList will be used to merge the source catalogs.

Additional keyword arguments (forwarded to MergeSourcesTask.__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
[in]**kwargskeyword arguments to be passed to MergeSourcesTask.__init__

The task will set its own self.schema attribute to the schema of the output merged catalog.

Invoking the Task

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

Configuration parameters

See MergeDetectionsConfig_

Debug variables

The command line task interface supports a flag -d to import debug.py from your PYTHONPATH; see baseDebug for more about debug.py files.

MergeDetectionsTask has no debug variables.

A complete example of using MergeDetectionsTask

MergeDetectionsTask is meant to be run after detecting sources in coadds generated for the chosen subset of the available bands. The purpose of the task is to merge sources (peaks & footprints) detected in the coadds generated from the chosen subset of filters. Subsequent tasks in the multi-band processing procedure will deblend the generated master list of sources and, eventually, perform forced photometry. Command-line usage of MergeDetectionsTask expects data references for all the coadds to be processed. A list of the available optional arguments can be obtained by calling mergeCoaddDetections.py with the --help command line argument:

1 mergeCoaddDetections.py --help

To demonstrate usage of the DetectCoaddSourcesTask in the larger context of multi-band processing, we will process HSC data in the ci_hsc package. Assuming one has finished step 5 at High-level Overview of Multi-Band Coadd Processing, one may merge the catalogs of sources from each coadd as follows:

1 mergeCoaddDetections.py $CI_HSC_DIR/DATA --id patch=5,4 tract=0 filter=HSC-I^HSC-R

This will merge the HSC-I & -R band parent source catalogs and write the results to $CI_HSC_DIR/DATA/deepCoadd-results/merged/0/5,4/mergeDet-0-5,4.fits.

The next step in the multi-band processing procedure is MeasureMergedCoaddSourcesTask

Definition at line 595 of file multiBand.py.

Constructor & Destructor Documentation

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

Initialize the merge detections task.

A FootprintMergeList will be used to merge the source catalogs.

Additional keyword arguments (forwarded to MergeSourcesTask.__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
[in]**kwargskeyword arguments to be passed to MergeSourcesTask.__init__

The task will set its own self.schema attribute to the schema of the output merged catalog.

Definition at line 682 of file multiBand.py.

Member Function Documentation

def lsst.pipe.tasks.multiBand.MergeDetectionsTask.cullPeaks (   self,
  catalog 
)

Attempt to remove garbage peaks (mostly on the outskirts of large blends).

Parameters
[in]catalogSource catalog

Definition at line 758 of file multiBand.py.

def lsst.pipe.tasks.multiBand.MergeDetectionsTask.getSchemaCatalogs (   self)

Return a dict of empty catalogs for each catalog dataset produced by this task.

Parameters
[out]dictionaryof empty catalogs

Definition at line 786 of file multiBand.py.

def lsst.pipe.tasks.multiBand.MergeDetectionsTask.getSkySourceFootprints (   self,
  mergedList,
  skyInfo,
  growDetectedFootprints = 0 
)

Return a list of Footprints of sky objects which don't overlap with anything in mergedList.

Parameters
mergedListThe merged Footprints from all the input bands
skyInfoA description of the patch
growDetectedFootprintsThe number of pixels to grow the detected footprints

Definition at line 797 of file multiBand.py.

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

Merge multiple catalogs.

After ordering the catalogs and filters in priority order, getMergedSourceCatalog of the FootprintMergeList created by __init__ is used to perform the actual merging. Finally, cullPeaks is used to remove garbage peaks detected around bright objects.

Parameters
[in]catalogs
[in]patchRef
[out]mergedList

Definition at line 704 of file multiBand.py.

Member Data Documentation

lsst.pipe.tasks.multiBand.MergeDetectionsTask.ConfigClass = MergeDetectionsConfig
static

Definition at line 676 of file multiBand.py.

string lsst.pipe.tasks.multiBand.MergeDetectionsTask.inputDataset = "det"
static

Definition at line 678 of file multiBand.py.

tuple lsst.pipe.tasks.multiBand.MergeDetectionsTask.makeIdFactory = _makeMakeIdFactory("MergedCoaddId")
static

Definition at line 680 of file multiBand.py.

lsst.pipe.tasks.multiBand.MergeDetectionsTask.merged

Definition at line 702 of file multiBand.py.

string lsst.pipe.tasks.multiBand.MergeDetectionsTask.outputDataset = "mergeDet"
static

Definition at line 679 of file multiBand.py.

lsst.pipe.tasks.multiBand.MergeDetectionsTask.schema

Definition at line 697 of file multiBand.py.


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