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
|
Deblend sources from master catalog in each coadd seperately and measure. More...
Public Member Functions | |
def | __init__ (self, butler=None, schema=None, peakSchema=None, refObjLoader=None, initInputs=None, kwargs) |
Initialize the task. More... | |
def | getInputDatasetTypes (cls, config) |
def | getOutputDatasetTypes (cls, config) |
def | getPrerequisiteDatasetTypes (cls, config) |
def | getInitOutputDatasets (self) |
def | adaptArgsAndRun (self, inputData, inputDataIds, outputDataIds, butler) |
def | runDataRef (self, patchRef, psfCache=100) |
Deblend and measure. More... | |
def | run (self, exposure, sources, skyInfo, exposureId, ccdInputs=None, visitCatalogs=None, wcsUpdates=None, butler=None) |
def | readSources (self, dataRef) |
Read input sources. More... | |
def | writeMatches (self, dataRef, results) |
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 | |
deblended | |
inputCatalog | |
schemaMapper | |
schema | |
algMetadata | |
Static Public Attributes | |
ConfigClass = MeasureMergedCoaddSourcesConfig | |
RunnerClass = MeasureMergedCoaddSourcesRunner | |
getSchemaCatalogs = _makeGetSchemaCatalogs("meas") | |
makeIdFactory = _makeMakeIdFactory("MergedCoaddId") | |
Deblend sources from master catalog in each coadd seperately and measure.
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) or deblender outputs (including a HeavyFootprint in each band), 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.
MeasureMergedCoaddSourcesTask delegates most of its work to a set of sub-tasks:
These subtasks may be retargeted as required.
Initialize the task. Keyword arguments (in addition to those forwarded to CmdLineTask.__init__):
[in] | schema | the schema of the merged detection catalog used as input to this one |
[in] | peakSchema | the schema of the PeakRecords in the Footprints in the merged detection catalog |
[in] | refObjLoader | an 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] | butler | a 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.
Run measurement algorithms on the input exposure, and optionally populate the resulting catalog with extra information. Parameters ---------- exposure : `lsst.afw.exposure.Exposure` The input exposure on which measurements are to be performed sources : `lsst.afw.table.SourceCatalog` A catalog built from the results of merged detections, or deblender outputs. skyInfo : `lsst.pipe.base.Struct` A struct containing information about the position of the input exposure within a `SkyMap`, the `SkyMap`, its `Wcs`, and its bounding box exposureId : `int` or `bytes` packed unique number or bytes unique to the input exposure ccdInputs : `lsst.afw.table.ExposureCatalog` Catalog containing information on the individual visits which went into making the exposure visitCatalogs : list of `lsst.afw.table.SourceCatalogs` or `None` A list of source catalogs corresponding to measurements made on the individual visits which went into the input exposure. If None and butler is `None` then the task cannot propagate visit flags to the output catalog. wcsUpdates : list of `lsst.afw.geom.SkyWcs` or `None` If visitCatalogs is not `None` this should be a list of wcs objects which correspond to the input visits. Used to put all coordinates to common system. If `None` and butler is `None` then the task cannot propagate visit flags to the output catalog. butler : `lsst.daf.butler.Butler` or `lsst.daf.persistence.Butler` Either a gen2 or gen3 butler used to load visit catalogs Returns ------- results : `lsst.pipe.base.Struct` Results of running measurement task. Will contain the catalog in the sources attribute. Optionally will have results of matching to a reference catalog in the matchResults attribute, and denormalized matches in the denormMatches attribute.
See MeasureMergedCoaddSourcesConfig_
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.
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.
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:
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 pipeTasks_multiBand, one may perform deblending and measure sources in the HSC-I band coadd as follows:
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
to generate the sources catalogs for the HSC-R band required by the next step in the multi-band procedure: MergeMeasurementsTask.
Definition at line 748 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.__init__ | ( | self, | |
butler = None , |
|||
schema = None , |
|||
peakSchema = None , |
|||
refObjLoader = None , |
|||
initInputs = None , |
|||
kwargs | |||
) |
Initialize the task.
Keyword arguments (in addition to those forwarded to CmdLineTask.__init__):
[in] | schema | the schema of the merged detection catalog used as input to this one |
[in] | peakSchema | the schema of the PeakRecords in the Footprints in the merged detection catalog |
[in] | refObjLoader | an 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] | butler | a 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 873 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.adaptArgsAndRun | ( | self, | |
inputData, | |||
inputDataIds, | |||
outputDataIds, | |||
butler | |||
) |
Definition at line 937 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getExposureId | ( | self, | |
dataRef | |||
) |
Definition at line 1159 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getInitOutputDatasets | ( | self | ) |
Definition at line 934 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getInputDatasetTypes | ( | cls, | |
config | |||
) |
Definition at line 915 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getOutputDatasetTypes | ( | cls, | |
config | |||
) |
Definition at line 922 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.getPrerequisiteDatasetTypes | ( | cls, | |
config | |||
) |
Definition at line 931 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.readSources | ( | self, | |
dataRef | |||
) |
Read input sources.
[in] | dataRef | Data reference for catalog of merged detections |
We also need to add columns to hold the measurements we're about to make so we can measure in-place.
Definition at line 1117 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.run | ( | self, | |
exposure, | |||
sources, | |||
skyInfo, | |||
exposureId, | |||
ccdInputs = None , |
|||
visitCatalogs = None , |
|||
wcsUpdates = None , |
|||
butler = None |
|||
) |
Run measurement algorithms on the input exposure, and optionally populate the resulting catalog with extra information. Parameters ---------- exposure : `lsst.afw.exposure.Exposure` The input exposure on which measurements are to be performed sources : `lsst.afw.table.SourceCatalog` A catalog built from the results of merged detections, or deblender outputs. skyInfo : `lsst.pipe.base.Struct` A struct containing information about the position of the input exposure within a `SkyMap`, the `SkyMap`, its `Wcs`, and its bounding box exposureId : `int` or `bytes` packed unique number or bytes unique to the input exposure ccdInputs : `lsst.afw.table.ExposureCatalog` Catalog containing information on the individual visits which went into making the exposure visitCatalogs : list of `lsst.afw.table.SourceCatalogs` or `None` A list of source catalogs corresponding to measurements made on the individual visits which went into the input exposure. If None and butler is `None` then the task cannot propagate visit flags to the output catalog. wcsUpdates : list of `lsst.afw.geom.SkyWcs` or `None` If visitCatalogs is not `None` this should be a list of wcs objects which correspond to the input visits. Used to put all coordinates to common system. If `None` and butler is `None` then the task cannot propagate visit flags to the output catalog. butler : `lsst.daf.butler.Butler` or `lsst.daf.persistence.Butler` Either a gen2 or gen3 butler used to load visit catalogs Returns ------- results : `lsst.pipe.base.Struct` Results of running measurement task. Will contain the catalog in the sources attribute. Optionally will have results of matching to a reference catalog in the matchResults attribute, and denormalized matches in the denormMatches attribute.
Definition at line 1034 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.runDataRef | ( | self, | |
patchRef, | |||
psfCache = 100 |
|||
) |
Deblend and measure.
[in] | patchRef | Patch reference. |
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 998 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.write | ( | self, | |
dataRef, | |||
sources | |||
) |
Write the source catalog.
[in] | dataRef | data reference |
[in] | sources | source catalog |
Definition at line 1149 of file multiBand.py.
def lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.writeMatches | ( | self, | |
dataRef, | |||
results | |||
) |
Write matches of the sources to the astrometric reference catalog.
[in] | dataRef | data reference |
[in] | results | results struct from run method |
Definition at line 1137 of file multiBand.py.
lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.algMetadata |
Definition at line 901 of file multiBand.py.
|
static |
Definition at line 858 of file multiBand.py.
lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.deblended |
Definition at line 891 of file multiBand.py.
|
static |
Definition at line 860 of file multiBand.py.
lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.inputCatalog |
Definition at line 892 of file multiBand.py.
|
static |
Definition at line 861 of file multiBand.py.
|
static |
Definition at line 859 of file multiBand.py.
lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.schema |
Definition at line 900 of file multiBand.py.
lsst.pipe.tasks.multiBand.MeasureMergedCoaddSourcesTask.schemaMapper |
Definition at line 898 of file multiBand.py.