|
lsst.pipe.tasks
14.0-53-g87cac093+4
|
Public Member Functions | |
| def | __init__ (self, datasetType, sourceKeyTuple) |
| def | addSourceMetrics (self, repoInfo, idKeyTuple, idValList, sourceTableList) |
| def | finalize (self) |
Public Attributes | |
| datasetType | |
| repoInfoList | |
| sourceArr | |
| sourceIdDict | |
| repoArr | |
Accumulate a set of measurements from a set of source tables
To use:
- specify the desired source measurements when constructing this object
- call addSourceMetrics for each repository you harvest data from
- call finalize to produce the final data
Data available after calling finalize:
- self.sourceArr: a numpy structured array of shape (num repositories, num sources)
containing named columns for:
- source ID
- each data ID key
- each item of data extracted from the source table
- self.sourceIdDict: a dict of (source ID: index of axis 1 of self.sourceArr)
- self.repoArr: a numpy structured array of shape (num repositories,)
containing a named column for each repository key (see RepositoryIterator)
@note: sources that had non-finite data (e.g. NaN) for every value extracted are silently omitted
Definition at line 57 of file repositoryIterator.py.
| def lsst.pipe.tasks.repositoryIterator.SourceData.__init__ | ( | self, | |
| datasetType, | |||
| sourceKeyTuple | |||
| ) |
@param[in] datasetType: dataset type for source @param[in] sourceKeyTuple: list of keys of data items to extract from the source tables @raise RuntimeError if sourceKeyTuple is empty
Definition at line 78 of file repositoryIterator.py.
| def lsst.pipe.tasks.repositoryIterator.SourceData.addSourceMetrics | ( | self, | |
| repoInfo, | |||
| idKeyTuple, | |||
| idValList, | |||
| sourceTableList | |||
| ) |
Accumulate source measurements from a list of source tables.
Once you have accumulated all source measurements, call finalize to process the data.
@param[in] repoInfo: a RepositoryInfo instance
@param[in] idKeyTuple: a tuple of data ID keys; must be the same for each call
@param[in] idValList: a list of data ID value tuples;
each tuple contains values in the order in idKeyTuple
@param[in] sourceTableList: a list of source tables, one per entry in idValList
@raise RuntimeError if idKeyTuple is different than it was for the first call.
Accumulates the data in temporary cache self._tempDataList.
@return number of sources
Definition at line 156 of file repositoryIterator.py.
| def lsst.pipe.tasks.repositoryIterator.SourceData.finalize | ( | self | ) |
Process the accumulated source measurements to create the final data products. Only call this after you have added all source metrics using addSourceMetrics. Reads temporary cache self._tempDataList and then deletes it.
Definition at line 183 of file repositoryIterator.py.
| lsst.pipe.tasks.repositoryIterator.SourceData.datasetType |
Definition at line 87 of file repositoryIterator.py.
| lsst.pipe.tasks.repositoryIterator.SourceData.repoArr |
Definition at line 212 of file repositoryIterator.py.
| lsst.pipe.tasks.repositoryIterator.SourceData.repoInfoList |
Definition at line 103 of file repositoryIterator.py.
| lsst.pipe.tasks.repositoryIterator.SourceData.sourceArr |
Definition at line 205 of file repositoryIterator.py.
| lsst.pipe.tasks.repositoryIterator.SourceData.sourceIdDict |
Definition at line 208 of file repositoryIterator.py.
1.8.13