LSSTApplications
17.0+10,17.0+52,17.0+91,18.0.0+11,18.0.0+16,18.0.0+38,18.0.0+4,18.0.0-2-ge43143a+8,18.1.0-1-g0001055+4,18.1.0-1-g1349e88+13,18.1.0-1-g2505f39+10,18.1.0-1-g380d4d4+13,18.1.0-1-g5315e5e,18.1.0-1-g5e4b7ea+4,18.1.0-1-g7e8fceb,18.1.0-1-g85f8cd4+10,18.1.0-1-g9a6769a+4,18.1.0-1-ga1a4c1a+9,18.1.0-1-gd55f500+5,18.1.0-1-ge10677a+10,18.1.0-11-gb2589d7b,18.1.0-13-g451e75588+2,18.1.0-13-gbfe7f7f+4,18.1.0-14-g2e73c10+1,18.1.0-2-g31c43f9+10,18.1.0-2-g919ecaf,18.1.0-2-g9c63283+13,18.1.0-2-gdf0b915+13,18.1.0-2-gfefb8b5+2,18.1.0-3-g52aa583+4,18.1.0-3-g8f4a2b1+4,18.1.0-3-g9cb968e+12,18.1.0-3-gab23065,18.1.0-4-g7bbbad0+4,18.1.0-5-g510c42a+12,18.1.0-5-gaeab27e+13,18.1.0-6-gc4bdb98+2,18.1.0-6-gdda7f3e+15,18.1.0-9-g9613d271+1,w.2019.34
LSSTDataManagementBasePackage
|
Merge coadd detections from multiple bands. More...
Public Member Functions | |
def | getInputSchema (self, butler=None, schema=None) |
def | __init__ (self, butler=None, schema=None, initInputs=None, kwargs) |
Initialize the merge detections task. More... | |
def | getInitOutputDatasets (self) |
def | runDataRef (self, patchRefList) |
def | adaptArgsAndRun (self, inputData, inputDataIds, outputDataIds, butler) |
def | run (self, catalogs, skyInfo, idFactory, skySeed) |
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 | 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 | |
RunnerClass = MergeSourcesRunner | |
string | inputDataset = "det" |
string | outputDataset = "mergeDet" |
makeIdFactory = _makeMakeIdFactory("MergedCoaddId") | |
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_.
Initialize the merge detections task. A FootprintMergeList will be used to merge the source catalogs.
[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] | initInputs | This a PipelineTask-only argument that holds all inputs passed in through the PipelineTask middleware |
[in] | **kwargs | keyword arguments to be passed to CmdLineTask.__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 pipeTasks_multiBand, 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 114 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.__init__ | ( | self, | |
butler = None , |
|||
schema = None , |
|||
initInputs = None , |
|||
kwargs | |||
) |
Initialize the merge detections task.
A FootprintMergeList will be used to merge the source catalogs.
[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] | initInputs | This a PipelineTask-only argument that holds all inputs passed in through the PipelineTask middleware |
[in] | **kwargs | keyword arguments to be passed to CmdLineTask.__init__ |
The task will set its own self.schema attribute to the schema of the output merged catalog.
Definition at line 207 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.adaptArgsAndRun | ( | self, | |
inputData, | |||
inputDataIds, | |||
outputDataIds, | |||
butler | |||
) |
Definition at line 246 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.cullPeaks | ( | self, | |
catalog | |||
) |
Attempt to remove garbage peaks (mostly on the outskirts of large blends).
[in] | catalog | Source catalog |
Definition at line 316 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.getInitOutputDatasets | ( | self | ) |
Definition at line 234 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.getInputSchema | ( | self, | |
butler = None , |
|||
schema = None |
|||
) |
Definition at line 204 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.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 344 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.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 355 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.run | ( | self, | |
catalogs, | |||
skyInfo, | |||
idFactory, | |||
skySeed | |||
) |
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 269 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.runDataRef | ( | self, | |
patchRefList | |||
) |
Definition at line 238 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.write | ( | self, | |
patchRef, | |||
catalog | |||
) |
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 386 of file mergeDetections.py.
def lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.writeMetadata | ( | self, | |
dataRefList | |||
) |
No metadata to write, and not sure how to write it for a list of dataRefs.
Definition at line 403 of file mergeDetections.py.
|
static |
Definition at line 193 of file mergeDetections.py.
|
static |
Definition at line 196 of file mergeDetections.py.
|
static |
Definition at line 198 of file mergeDetections.py.
lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.merged |
Definition at line 232 of file mergeDetections.py.
|
static |
Definition at line 197 of file mergeDetections.py.
|
static |
Definition at line 194 of file mergeDetections.py.
lsst.pipe.tasks.mergeDetections.MergeDetectionsTask.schema |
Definition at line 228 of file mergeDetections.py.