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

Detect sources on a coadd. More...

Inheritance diagram for lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask:

Public Member Functions

def __init__ (self, schema=None, kwargs)
 Initialize the task. More...
 
def run (self, patchRef)
 Run detection on a coadd. More...
 
def runDetection (self, exposure, idFactory)
 Run detection on an exposure. More...
 
def write (self, exposure, results, patchRef)
 Write out results from runDetection. More...
 

Public Attributes

 schema
 

Static Public Attributes

 ConfigClass = DetectCoaddSourcesConfig
 
 getSchemaCatalogs = _makeGetSchemaCatalogs("det")
 
 makeIdFactory = _makeMakeIdFactory("CoaddId")
 

Detailed Description

Detect sources on a coadd.

Contents

Description

Command-line task that detects sources on a coadd of exposures obtained with a single filter.

Coadding individual visits requires each exposure to be warped. This introduces covariance in the noise properties across pixels. Before detection, we correct the coadd variance by scaling the variance plane in the coadd to match the observed variance. This is an approximate approach – strictly, we should propagate the full covariance matrix – but it is simple and works well in practice.

After scaling the variance plane, we detect sources and generate footprints by delegating to the detection subtask.

Inputs:
deepCoadd{tract,patch,filter}: ExposureF
Outputs:
deepCoadd_det{tract,patch,filter}: SourceCatalog (only parent Footprints)
deepCoadd_calexp{tract,patch,filter}: Variance scaled, background-subtracted input exposure (ExposureF)
deepCoadd_calexp_background{tract,patch,filter}: BackgroundList
Data Unit:
tract, patch, filter

DetectCoaddSourcesTask delegates most of its work to the detection subtask. You can retarget this subtask if you wish.

Task initialization

Initialize the task. Create the detection subtask.

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

Parameters
[in]schemainitial schema for the output catalog, modified-in place to include all fields set by this task. If None, the source minimal schema will be used.
[in]**kwargskeyword arguments to be passed to lsst.pipe.base.task.Task.__init__

Invoking the Task

Run detection on a coadd. Invokes runDetection and then uses write to output the results.

Parameters
[in]patchRefdata reference for patch

Configuration parameters

See DetectSourcesConfig

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.

DetectCoaddSourcesTask has no debug variables of its own because it relegates all the work to SourceDetectionTask; see the documetation for SourceDetectionTask for further information.

A complete example of using DetectCoaddSourcesTask

DetectCoaddSourcesTask is meant to be run after assembling a coadded image in a given band. The purpose of the task is to update the background, detect all sources in a single band and generate a set of parent footprints. Subsequent tasks in the multi-band processing procedure will merge sources across bands and, eventually, perform forced photometry. Command-line usage of DetectCoaddSourcesTask expects a data reference to the coadd to be processed. A list of the available optional arguments can be obtained by calling detectCoaddSources.py with the --help command line argument:

detectCoaddSources.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 followed steps 1 - 4 at High-level Overview of Multi-Band Coadd Processing, one may detect all the sources in each coadd as follows:

detectCoaddSources.py $CI_HSC_DIR/DATA --id patch=5,4 tract=0 filter=HSC-I

that will process the HSC-I band data. The results are written to $CI_HSC_DIR/DATA/deepCoadd-results/HSC-I.

It is also necessary to run:

detectCoaddSources.py $CI_HSC_DIR/DATA --id patch=5,4 tract=0 filter=HSC-R

to generate the sources catalogs for the HSC-R band required by the next step in the multi-band processing procedure: MergeDetectionsTask.

Definition at line 143 of file multiBand.py.

Constructor & Destructor Documentation

◆ __init__()

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

Initialize the task.

Create the detection subtask.

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

Parameters
[in]schemainitial schema for the output catalog, modified-in place to include all fields set by this task. If None, the source minimal schema will be used.
[in]**kwargskeyword arguments to be passed to lsst.pipe.base.task.Task.__init__

Definition at line 245 of file multiBand.py.

Member Function Documentation

◆ run()

def lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.run (   self,
  patchRef 
)

Run detection on a coadd.

Invokes runDetection and then uses write to output the results.

Parameters
[in]patchRefdata reference for patch

Definition at line 263 of file multiBand.py.

◆ runDetection()

def lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.runDetection (   self,
  exposure,
  idFactory 
)

Run detection on an exposure.

First scale the variance plane to match the observed variance using scaleVariance. Then invoke the detection subtask to detect sources.

Parameters
[in]exposureExposure on which to detect
[in]idFactoryIdFactory to set source identifiers
Returns
a pipe.base.Struct with fields
  • sources: catalog of detections
  • backgrounds: list of backgrounds

Definition at line 277 of file multiBand.py.

◆ write()

def lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.write (   self,
  exposure,
  results,
  patchRef 
)

Write out results from runDetection.

Parameters
[in]exposureExposure to write out
[in]resultsStruct returned from runDetection
[in]patchRefdata reference for patch

Definition at line 305 of file multiBand.py.

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.ConfigClass = DetectCoaddSourcesConfig
static

Definition at line 234 of file multiBand.py.

◆ getSchemaCatalogs

lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.getSchemaCatalogs = _makeGetSchemaCatalogs("det")
static

Definition at line 235 of file multiBand.py.

◆ makeIdFactory

lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.makeIdFactory = _makeMakeIdFactory("CoaddId")
static

Definition at line 236 of file multiBand.py.

◆ schema

lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask.schema

Definition at line 260 of file multiBand.py.


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