lsst.pipe.tasks
21.0.0-105-g89a8187d+5c5fa69342
|
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 54 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 75 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 153 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 180 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.datasetType |
Definition at line 84 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.repoArr |
Definition at line 209 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.repoInfoList |
Definition at line 100 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.sourceArr |
Definition at line 202 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.sourceIdDict |
Definition at line 205 of file repositoryIterator.py.