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

Deblend sources from master catalog in each coadd seperately and measure. More...

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

Public Member Functions

def __init__ (self, butler=None, schema=None, peakSchema=None, refObjLoader=None, kwargs)
 Initialize the task. More...
 
def run (self, patchRef)
 Deblend and measure. More...
 
def readSources (self, dataRef)
 Read input sources. More...
 
def writeMatches (self, dataRef, exposure, sources)
 Write matches of the sources to the astrometric reference catalog. More...
 
def write (self, dataRef, sources)
 Write the source catalog. More...
 
def getExposureId (self, dataRef)
 

Public Attributes

 schemaMapper
 
 schema
 
 algMetadata
 

Static Public Attributes

 ConfigClass = MeasureMergedCoaddSourcesConfig
 
 RunnerClass = ButlerInitializedTaskRunner
 
 getSchemaCatalogs = _makeGetSchemaCatalogs("meas")
 
 makeIdFactory = _makeMakeIdFactory("MergedCoaddId")
 

Detailed Description

Deblend sources from master catalog in each coadd seperately and measure.

Contents

Description

Command-line task that uses peaks and footprints from a master catalog to perform deblending and measurement in each coadd.

Given a master input catalog of sources (peaks and footprints), deblend and measure each source on the coadd. Repeating this procedure with the same master catalog across multiple coadds will generate a consistent set of child sources.

The deblender retains all peaks and deblends any missing peaks (dropouts in that band) as PSFs. Source properties are measured and the is-primary flag (indicating sources with no children) is set. Visit flags are propagated to the coadd sources.

Optionally, we can match the coadd sources to an external reference catalog.

Inputs:
deepCoadd_mergeDet{tract,patch}: SourceCatalog
deepCoadd_calexp{tract,patch,filter}: ExposureF
Outputs:
deepCoadd_meas{tract,patch,filter}: SourceCatalog
Data Unit:
tract, patch, filter

MeasureMergedCoaddSourcesTask delegates most of its work to a set of sub-tasks:

deblend
Deblend all the sources from the master catalog.
measurement
Measure source properties of deblended sources.
setPrimaryFlags
Set flag 'is-primary' as well as related flags on sources. 'is-primary' is set for sources that are not at the edge of the field and that have either not been deblended or are the children of deblended sources
propagateFlags
Propagate flags set in individual visits to the coadd.
match
Match input sources to a reference catalog (optional).

These subtasks may be retargeted as required.

Task initialization

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

Parameters
[in]schemathe schema of the merged detection catalog used as input to this one
[in]peakSchemathe schema of the PeakRecords in the Footprints in the merged detection catalog
[in]refObjLoaderan instance of LoadReferenceObjectsTasks that supplies an external reference catalog. May be None if the loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled.
[in]butlera butler used to read the input schemas from disk or construct the reference catalog loader, if schema or peakSchema or refObjLoader is None

The task will set its own self.schema attribute to the schema of the output measurement catalog. This will include all fields from the input schema, as well as additional fields for all the measurements.

Invoking the Task

Deblend and measure.

Parameters
[in]patchRefPatch reference.

Deblend each source in every coadd and measure. Set 'is-primary' and related flags. Propagate flags from individual visits. Optionally match the sources to a reference catalog and write the matches. Finally, write the deblended sources and measurements out.

Configuration parameters

See MeasureMergedCoaddSourcesConfig_

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.

MeasureMergedCoaddSourcesTask has no debug variables of its own because it delegates all the work to the various sub-tasks. See the documetation for individual sub-tasks for more information.

A complete example of using MeasureMergedCoaddSourcesTask

After MeasureMergedCoaddSourcesTask has been run on multiple coadds, we have a set of per-band catalogs. The next stage in the multi-band processing procedure will merge these measurements into a suitable catalog for driving forced photometry.

Command-line usage of MeasureMergedCoaddSourcesTask expects a data reference to the coadds to be processed. A list of the available optional arguments can be obtained by calling measureCoaddSources.py with the --help command line argument:

measureCoaddSources.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 6 at High-level Overview of Multi-Band Coadd Processing, one may perform deblending and measure sources in the HSC-I band coadd as follows:

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

This will process the HSC-I band data. The results are written in `$CI_HSC_DIR/DATA/deepCoadd-results/HSC-I/0/5,4/meas-HSC-I-0-5,4.fits

It is also necessary to run

measureCoaddSources.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 procedure: MergeMeasurementsTask.

Definition at line 921 of file multiBand.py.

Constructor & Destructor Documentation

◆ __init__()

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

Initialize the task.

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

Parameters
[in]schemathe schema of the merged detection catalog used as input to this one
[in]peakSchemathe schema of the PeakRecords in the Footprints in the merged detection catalog
[in]refObjLoaderan instance of LoadReferenceObjectsTasks that supplies an external reference catalog. May be None if the loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled.
[in]butlera butler used to read the input schemas from disk or construct the reference catalog loader, if schema or peakSchema or refObjLoader is None

The task will set its own self.schema attribute to the schema of the output measurement catalog. This will include all fields from the input schema, as well as additional fields for all the measurements.

Definition at line 1043 of file multiBand.py.

Member Function Documentation

◆ getExposureId()

def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getExposureId (   self,
  dataRef 
)

Definition at line 1183 of file multiBand.py.

◆ readSources()

def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.readSources (   self,
  dataRef 
)

Read input sources.

Parameters
[in]dataRefData reference for catalog of merged detections
Returns
List of sources in merged catalog

We also need to add columns to hold the measurements we're about to make so we can measure in-place.

Definition at line 1133 of file multiBand.py.

◆ run()

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

Deblend and measure.

Parameters
[in]patchRefPatch reference.

Deblend each source in every coadd and measure. Set 'is-primary' and related flags. Propagate flags from individual visits. Optionally match the sources to a reference catalog and write the matches. Finally, write the deblended sources and measurements out.

Definition at line 1087 of file multiBand.py.

◆ write()

def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.write (   self,
  dataRef,
  sources 
)

Write the source catalog.

Parameters
[in]dataRefdata reference
[in]sourcessource catalog

Definition at line 1173 of file multiBand.py.

◆ writeMatches()

def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.writeMatches (   self,
  dataRef,
  exposure,
  sources 
)

Write matches of the sources to the astrometric reference catalog.

We use the Wcs in the exposure to match sources.

Parameters
[in]dataRefdata reference
[in]exposureexposure with Wcs
[in]sourcessource catalog

Definition at line 1153 of file multiBand.py.

Member Data Documentation

◆ algMetadata

lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.algMetadata

Definition at line 1067 of file multiBand.py.

◆ ConfigClass

lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.ConfigClass = MeasureMergedCoaddSourcesConfig
static

Definition at line 1030 of file multiBand.py.

◆ getSchemaCatalogs

lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getSchemaCatalogs = _makeGetSchemaCatalogs("meas")
static

Definition at line 1032 of file multiBand.py.

◆ makeIdFactory

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

Definition at line 1033 of file multiBand.py.

◆ RunnerClass

lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.RunnerClass = ButlerInitializedTaskRunner
static

Definition at line 1031 of file multiBand.py.

◆ schema

lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.schema

Definition at line 1066 of file multiBand.py.

◆ schemaMapper

lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.schemaMapper

Definition at line 1064 of file multiBand.py.


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