lsst.obs.base
13.0-53-g5f60c8c
|
Public Member Functions | |
def | __init__ (self, datasetType, policy, registry, rootStorage, provided=None) |
def | template (self) |
def | keys (self) |
def | map (self, mapper, dataId, write=False) |
def | lookup (self, properties, dataId) |
def | have (self, properties, dataId) |
def | need (self, properties, dataId) |
Public Attributes | |
datasetType | |
registry | |
rootStorage | |
keyDict | |
python | |
persistable | |
storage | |
level | |
tables | |
range | |
columns | |
obsTimeName | |
recipe | |
Mapping is a base class for all mappings. Mappings are used by the Mapper to map (determine a path to some data given some identifiers) and standardize (convert data into some standard format or type) data, and to query the associated registry to see what data is available. Subclasses must specify self.storage or else override self.map(). Public methods: lookup, have, need, getKeys, map Mappings are specified mainly by policy. A Mapping policy should consist of: template (string): a Python string providing the filename for that particular dataset type based on some data identifiers. In the case of redundancy in the path (e.g., file uniquely specified by the exposure number, but filter in the path), the redundant/dependent identifiers can be looked up in the registry. python (string): the Python type for the retrieved data (e.g. lsst.afw.image.ExposureF) persistable (string): the Persistable registration for the on-disk data (e.g. ImageU) storage (string, optional): Storage type for this dataset type (e.g. "BoostStorage") level (string, optional): the level in the camera hierarchy at which the data is stored (Amp, Ccd or skyTile), if relevant tables (string, optional): a whitespace-delimited list of tables in the registry that can be NATURAL JOIN-ed to look up additional information.
Definition at line 36 of file mapping.py.
def lsst.obs.base.mapping.Mapping.__init__ | ( | self, | |
datasetType, | |||
policy, | |||
registry, | |||
rootStorage, | |||
provided = None |
|||
) |
Constructor for Mapping class. @param datasetType (string) @param policy (daf_persistence.Policy, or pexPolicy.Policy (only for backward compatibility)) Mapping Policy @param registry (lsst.obs.base.Registry) Registry for metadata lookups @param rootStorage (Storage subclass instance) Interface to persisted repository data @param provided (list of strings) Keys provided by the mapper
Definition at line 73 of file mapping.py.
def lsst.obs.base.mapping.Mapping.have | ( | self, | |
properties, | |||
dataId | |||
) |
Returns whether the provided data identifier has all the properties in the provided list. @param properties (list of strings) Properties required @parm dataId (dict) Dataset identifier @return (bool) True if all properties are present
Definition at line 250 of file mapping.py.
def lsst.obs.base.mapping.Mapping.keys | ( | self | ) |
Return the dict of keys and value types required for this mapping.
Definition at line 133 of file mapping.py.
def lsst.obs.base.mapping.Mapping.lookup | ( | self, | |
properties, | |||
dataId | |||
) |
Look up properties for in a metadata registry given a partial dataset identifier. @param properties (list of strings) @param dataId (dict) Dataset identifier @return (list of tuples) values of properties
Definition at line 177 of file mapping.py.
def lsst.obs.base.mapping.Mapping.map | ( | self, | |
mapper, | |||
dataId, | |||
write = False |
|||
) |
Standard implementation of map function. @param mapper (lsst.daf.persistence.Mapper) @param dataId (dict) Dataset identifier @return (lsst.daf.persistence.ButlerLocation)
Definition at line 137 of file mapping.py.
def lsst.obs.base.mapping.Mapping.need | ( | self, | |
properties, | |||
dataId | |||
) |
Ensures all properties in the provided list are present in the data identifier, looking them up as needed. This is only possible for the case where the data identifies a single exposure. @param properties (list of strings) Properties required @param dataId (dict) Partial dataset identifier @return (dict) copy of dataset identifier with enhanced values
Definition at line 261 of file mapping.py.
def lsst.obs.base.mapping.Mapping.template | ( | self | ) |
Definition at line 126 of file mapping.py.
lsst.obs.base.mapping.Mapping.columns |
Definition at line 121 of file mapping.py.
lsst.obs.base.mapping.Mapping.datasetType |
Definition at line 89 of file mapping.py.
lsst.obs.base.mapping.Mapping.keyDict |
Definition at line 100 of file mapping.py.
lsst.obs.base.mapping.Mapping.level |
Definition at line 115 of file mapping.py.
lsst.obs.base.mapping.Mapping.obsTimeName |
Definition at line 122 of file mapping.py.
lsst.obs.base.mapping.Mapping.persistable |
Definition at line 112 of file mapping.py.
lsst.obs.base.mapping.Mapping.python |
Definition at line 111 of file mapping.py.
lsst.obs.base.mapping.Mapping.range |
Definition at line 120 of file mapping.py.
lsst.obs.base.mapping.Mapping.recipe |
Definition at line 123 of file mapping.py.
lsst.obs.base.mapping.Mapping.registry |
Definition at line 90 of file mapping.py.
lsst.obs.base.mapping.Mapping.rootStorage |
Definition at line 91 of file mapping.py.
lsst.obs.base.mapping.Mapping.storage |
Definition at line 113 of file mapping.py.
lsst.obs.base.mapping.Mapping.tables |
Definition at line 117 of file mapping.py.