LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Public Member Functions | |
def | __init__ |
def | addSourceMetrics |
def | finalize |
Public Attributes | |
datasetType | |
repoInfoList | |
sourceArr | |
sourceIdDict | |
repoArr | |
Private Member Functions | |
def | _getSourceMetrics |
Private Attributes | |
_sourceKeyTuple | |
_idKeyTuple | |
_idKeyDTypeList | |
_sourceDTypeList | |
_repoKeyTuple | |
_repoDTypeList | |
_tempDataList | |
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 53 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 73 of file repositoryIterator.py.
|
private |
Obtain the desired source measurements from a list of source tables Extracts a set of source measurements (specified by sourceKeyTuple) from a list of source tables (one per data ID) and saves them as a dict of source ID: list of data @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 @return a dict of source id: data id tuple + source data tuple where source data tuple order matches sourceKeyTuple and data id tuple matches self._idKeyTuple (which is set from the first idKeyTuple) @raise RuntimeError if idKeyTuple is different than it was for the first call. GetRepositoryDataTask.run returns idKeyTuple and idValList; you can easily make a subclass of GetRepositoryDataTask that also returns sourceTableList. Updates instance variables: - self._idKeyTuple if not already set.
Definition at line 100 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 151 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 178 of file repositoryIterator.py.
|
private |
Definition at line 86 of file repositoryIterator.py.
|
private |
Definition at line 85 of file repositoryIterator.py.
|
private |
Definition at line 91 of file repositoryIterator.py.
|
private |
Definition at line 90 of file repositoryIterator.py.
|
private |
Definition at line 88 of file repositoryIterator.py.
|
private |
Definition at line 83 of file repositoryIterator.py.
|
private |
Definition at line 94 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.datasetType |
Definition at line 82 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.repoArr |
Definition at line 207 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.repoInfoList |
Definition at line 98 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.sourceArr |
Definition at line 200 of file repositoryIterator.py.
lsst.pipe.tasks.repositoryIterator.SourceData.sourceIdDict |
Definition at line 203 of file repositoryIterator.py.