lsst.meas.base  16.0-8-g2ce35ff+3
Functions
lsst.meas.base.measurementInvestigationLib Namespace Reference

Functions

def rebuildNoiseReplacer (exposure, measCat)
 
def makeRerunCatalog (schema, oldCatalog, idList, fields=None, resetParents=True, addParents=False)
 

Function Documentation

◆ makeRerunCatalog()

def lsst.meas.base.measurementInvestigationLib.makeRerunCatalog (   schema,
  oldCatalog,
  idList,
  fields = None,
  resetParents = True,
  addParents = False 
)
Creates a catalog prepopulated with ids

This function is used to generate a SourceCatalog containing blank records
with Ids specified in the idList parameter

This function is primarily used when rerunning measurements on a footprint.
Specifying ids in a new measurement catalog which correspond to ids in an
old catalog makes comparing results much easier.

The resetParents and addParents options are needed because
lsst.meas.base.SingleFrameMeasurementTask.runPlugins() will skip child
objects whose parents are not in the catalog.

Parameters
----------
schema : lsst.afw.table.Schema
    Schema used to describe the fields in the resulting SourceCatalog

oldCatalog : lsst.afw.table.SourceCatalog
    Catalog containing previous measurements.

idList : iterable
    Python iterable whose values should be numbers corresponding to
    measurement ids, ids must exist in the oldCatalog

fields : iterable
    Python iterable whose entries should be strings corresponding to schema
    keys that exist in both the old catalog and input schema. Fields listed
    will be copied from the old catalog into the new catalog.

resetParents: boolean
    Flag to toggle whether child objects whose parents are not in the
    idList should have their parents reset to zero.

addParents: boolean
    Flag to toggle whether parents of child objects will be added to the
    idList (if not already present).

Returns
-------
measCat : lsst.afw.table.SourceCatalog
    SourceCatalog prepopulated with entries corresponding to the ids
    specified

Definition at line 74 of file measurementInvestigationLib.py.

◆ rebuildNoiseReplacer()

def lsst.meas.base.measurementInvestigationLib.rebuildNoiseReplacer (   exposure,
  measCat 
)
Recreate NoiseReplacer used in measurement

Given a measurement catalog and the exposure on which the measurements were
made, reconstruct the NoiseReplacer object that was used to mask out
sources during measurement.

Parameters
----------
exposure : lsst.awf.exposure.Exposure
    The exposure on which measurements were made

meaCat : lsst.afw.table.SourceCatalog
    Catalog containing the outputs of measurements on each source

Returns
-------
noiseReplacer : lsst.meas.base.NoiseReplacer
    Object used to replace and or restore sources in the exposure with
    deterministic noise

Definition at line 31 of file measurementInvestigationLib.py.