|
lsst.afw
13.0-49-g6f23dda
|
Public Member Functions | |
| def | build |
| Construct a GroupView from a concatenated catalog. More... | |
| def | __init__ |
| def | __len__ |
| def | __iter__ |
| def | __getitem__ |
| def | where |
| def | aggregate |
| Run an aggregate function on each group, returning an array with one element for each group. More... | |
| def | apply |
| Run a non-aggregate function on each group, returning an array with one element for each record. More... | |
Public Attributes | |
| schema | |
| ids | |
| groups | |
| count | |
A mapping (i.e. dict-like object) that provides convenient operations on the concatenated catalogs returned by a MultiMatch object. A GroupView provides access to a catalog of grouped objects, in which the grouping is indicated by a field for which all records in a group have the same value. Once constructed, it allows operations similar to those supported by SQL "GROUP BY", such as filtering and aggregate calculation.
Definition at line 141 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.__init__ | ( | self, | |
| schema, | |||
| ids, | |||
| groups | |||
| ) |
Direct constructor; most users should call build() instead. This constructor takes the constituent arrays of the object directly, to allow multiple methods for construction.
Definition at line 168 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.__getitem__ | ( | self, | |
| key | |||
| ) |
Return the catalog subset that corresponds to an group field value
Definition at line 187 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.__iter__ | ( | self | ) |
Iterate over group field values
Definition at line 183 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.__len__ | ( | self | ) |
Return the number of groups
Definition at line 179 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.aggregate | ( | self, | |
| function, | |||
field = None, |
|||
dtype = float |
|||
| ) |
Run an aggregate function on each group, returning an array with one element for each group.
| [in] | function | Callable object that computes the aggregate value. If field is None, called with the entire subset catalog as an argument. If field is not None, called with an array view into that field. |
| [in] | field | A string name or Key object that indicates a single field the aggregate is computed over. |
| [in] | dtype | Data type for the output array. |
Definition at line 206 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.apply | ( | self, | |
| function, | |||
field = None, |
|||
dtype = float |
|||
| ) |
Run a non-aggregate function on each group, returning an array with one element for each record.
| [in] | function | Callable object that computes the aggregate value. If field is None, called with the entire subset catalog as an argument. If field is not None, called with an array view into that field. |
| [in] | field | A string name or Key object that indicates a single field the aggregate is computed over. |
| [in] | dtype | Data type for the output array. |
Definition at line 228 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.build | ( | cls, | |
| catalog, | |||
groupField = "object" |
|||
| ) |
Construct a GroupView from a concatenated catalog.
| [in] | catalog | Input catalog, containing records grouped by a field in which all records in the same group have the same value. Must be sorted by the group field. |
| [in] | groupField | Name or Key for the field that indicates groups. |
Definition at line 151 of file multiMatch.py.
| def lsst.afw.table.multiMatch.GroupView.where | ( | self, | |
| predicate | |||
| ) |
Return a new GroupView that contains only groups for which the given predicate function returns True. The predicate function is called once for each group, and passed a single argument: the subset catalog for that group.
Definition at line 194 of file multiMatch.py.
| lsst.afw.table.multiMatch.GroupView.count |
Definition at line 177 of file multiMatch.py.
| lsst.afw.table.multiMatch.GroupView.groups |
Definition at line 176 of file multiMatch.py.
| lsst.afw.table.multiMatch.GroupView.ids |
Definition at line 175 of file multiMatch.py.
| lsst.afw.table.multiMatch.GroupView.schema |
Definition at line 174 of file multiMatch.py.
1.8.5