lsst.pipe.tasks
16.0-18-g95848a16+2
|
Merge coadd detections from multiple bands. More...
Public Member Functions | |
def | __init__ (self, butler=None, schema=None, kwargs) |
Initialize the merge detections task. More... | |
def | run (self, catalogs, patchRef) |
Merge multiple catalogs. More... | |
def | cullPeaks (self, catalog) |
Attempt to remove garbage peaks (mostly on the outskirts of large blends). More... | |
def | getSchemaCatalogs (self) |
Return a dict of empty catalogs for each catalog dataset produced by this task. More... | |
def | getSkySourceFootprints (self, mergedList, skyInfo, seed) |
Return a list of Footprints of sky objects which don't overlap with anything in mergedList. More... | |
def | getInputSchema (self, butler=None, schema=None) |
Obtain the input schema either directly or froma butler reference. More... | |
def | runDataRef (self, patchRefList) |
Merge coadd sources from multiple bands. More... | |
def | readCatalog (self, patchRef) |
Read input catalog. 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... | |
Public Attributes | |
schema | |
merged | |
Static Public Attributes | |
ConfigClass = MergeDetectionsConfig | |
string | inputDataset = "det" |
string | outputDataset = "mergeDet" |
makeIdFactory = _makeMakeIdFactory("MergedCoaddId") | |
RunnerClass = MergeSourcesRunner | |
getSchemaCatalogs = None | |
Merge coadd detections from multiple bands.
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_.
MergeDetectionsTask subclasses MergeSourcesTask.
Initialize the merge detections task. A FootprintMergeList will be used to merge the source catalogs.
Additional keyword arguments (forwarded to MergeSourcesTask.__init__):
[in] | schema | the schema of the detection catalogs used as input to this one |
[in] | butler | a butler used to read the input schema from disk, if schema is None |
[in] | **kwargs | keyword arguments to be passed to MergeSourcesTask.__init__ |
The task will set its own self.schema attribute to the schema of the output merged catalog.
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.
[in] | catalogs | |
[in] | patchRef | |
[out] | mergedList |
The command line task interface supports a flag -d
to import debug.py from your PYTHONPATH
; see Using lsstDebug to control debugging output for more about debug.py files.
MergeDetectionsTask has no debug variables.
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:
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:
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 624 of file multiBand.py.
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__):
[in] | schema | the schema of the detection catalogs used as input to this one |
[in] | butler | a butler used to read the input schema from disk, if schema is None |
[in] | **kwargs | keyword 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 711 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MergeDetectionsTask.cullPeaks | ( | self, | |
catalog | |||
) |
Attempt to remove garbage peaks (mostly on the outskirts of large blends).
[in] | catalog | Source catalog |
Definition at line 782 of file multiBand.py.
|
inherited |
Obtain the input schema either directly or froma butler reference.
[in] | butler | butler reference to obtain the input schema from |
[in] | schema | the input schema |
Definition at line 470 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.
[out] | dictionary | of empty catalogs |
Definition at line 810 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MergeDetectionsTask.getSkySourceFootprints | ( | self, | |
mergedList, | |||
skyInfo, | |||
seed | |||
) |
Return a list of Footprints of sky objects which don't overlap with anything in mergedList.
mergedList | The merged Footprints from all the input bands |
skyInfo | A description of the patch |
seed | Seed for the random number generator |
Definition at line 821 of file multiBand.py.
|
inherited |
Read input catalog.
We read the input dataset provided by the 'inputDataset' class variable.
[in] | patchRef | data reference for patch |
Definition at line 507 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MergeDetectionsTask.run | ( | 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.
[in] | catalogs | |
[in] | patchRef | |
[out] | mergedList |
Definition at line 733 of file multiBand.py.
|
inherited |
Merge coadd sources from multiple bands.
Calls run
which must be defined in subclasses that inherit from MergeSourcesTask.
[in] | patchRefList | list of data references for each filter |
Definition at line 496 of file multiBand.py.
|
inherited |
Write the output.
[in] | patchRef | data reference for patch |
[in] | catalog | catalog |
We write as the dataset provided by the 'outputDataset' class variable.
Definition at line 533 of file multiBand.py.
|
inherited |
No metadata to write, and not sure how to write it for a list of dataRefs.
Definition at line 550 of file multiBand.py.
|
static |
Definition at line 705 of file multiBand.py.
|
staticinherited |
Definition at line 453 of file multiBand.py.
|
static |
Definition at line 707 of file multiBand.py.
|
static |
Definition at line 709 of file multiBand.py.
lsst.pipe.tasks.multiBand.MergeDetectionsTask.merged |
Definition at line 731 of file multiBand.py.
|
static |
Definition at line 708 of file multiBand.py.
|
staticinherited |
Definition at line 450 of file multiBand.py.
lsst.pipe.tasks.multiBand.MergeDetectionsTask.schema |
Definition at line 727 of file multiBand.py.