MultiMatch¶
-
class
lsst.afw.table.
MultiMatch
(schema, dataIdFormat, coordField='coord', idField='id', radius=None, RecordClass=<class 'lsst.afw.table.SourceRecord'>)¶ Bases:
object
Initialize a multi-catalog match.
Parameters: - schema :
lsst.afw.table.Schema
Schema shared by all catalogs to be included in the match.
- dataIdFormat :
dict
Set of name: type for all data ID keys (e.g. {“visit”:int, “ccd”:int}).
- coordField :
str
, optional Prefix for _ra and _dec fields that contain the coordinates to use for the match.
- idField :
str
, optional Name of the field in schema that contains unique object IDs.
- radius :
lsst.geom.Angle
, optional Maximum separation for a match. Defaults to 0.5 arcseconds.
- RecordClass :
lsst.afw.table.BaseRecord
Type of record to expect in catalogs to be matched.
Methods Summary
add
(catalog, dataId)Add a new catalog to the match, corresponding to the given data ID. finish
([removeAmbiguous])Return the final match catalog, after sorting it by object, copying it to ensure contiguousness, and optionally removing ambiguous matches. makeRecord
(inputRecord, dataId, objId)Create a new result record from the given input record, using the given data ID and object ID to fill in additional columns. Methods Documentation
-
add
(catalog, dataId)¶ Add a new catalog to the match, corresponding to the given data ID. The new catalog is appended to the
self.result
andself.reference
catalogs.Parameters: - catalog :
lsst.afw.table.base.Catalog
Catalog to be added to the match result.
- dataId :
DataId
ordict
Data id for the catalog to be added.
- catalog :
-
finish
(removeAmbiguous=True)¶ Return the final match catalog, after sorting it by object, copying it to ensure contiguousness, and optionally removing ambiguous matches.
After calling finish(), the in-progress state of the matcher is returned to the state it was just after construction, with the exception of the object ID counter (which is not reset).
Parameters: - removeAmbiguous :
bool
, optional Should ambiguous matches be removed from the match catalog? Defaults to True.
Returns: - result :
lsst.afw.table.base.Catalog
Final match catalog, sorted by object.
- removeAmbiguous :
-
makeRecord
(inputRecord, dataId, objId)¶ Create a new result record from the given input record, using the given data ID and object ID to fill in additional columns.
Parameters: Returns: - outputRecord :
lsst.afw.table.source.sourceRecord
Newly generated record.
- outputRecord :
- schema :