LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Classes | |
class | PropertyList |
class | PropertySet |
class | ReturnStyle |
Functions | |
getPropertySetState (container, asLists=False) | |
getPropertyListState (container, asLists=False) | |
setPropertySetState (container, state) | |
setPropertyListState (container, state) | |
_propertyContainerElementTypeName (container, name) | |
_propertyContainerGet (container, name, returnStyle) | |
_iterable (a) | |
_guessIntegerType (container, name, value) | |
_propertyContainerSet (container, name, value, typeMenu, *args) | |
_propertyContainerAdd (container, name, value, typeMenu, *args) | |
_makePropertySet (state) | |
_makePropertyList (state) | |
Variables | |
TypeAlias | NestedMetadataDict = Mapping[str, Union[str, float, int, bool, "NestedMetadataDict"]] |
dict | _TYPE_MAP = {} |
type_obj = getattr(PropertySet, "TYPE_" + checkType) | |
|
protected |
Given an existing container and name, determine the type that should be used for the supplied value. The supplied value is assumed to be a scalar. On Python 3 all ints are LongLong but we need to be able to store them in Int containers if that is what is being used (testing for truncation). Int is assumed to mean 32bit integer (2147483647 to -2147483648). If there is no pre-existing value we have to decide what to do. For now we pick Int if the value is less than maxsize. Parameters ---------- container : `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList` Container from which to get the value name : `str` Name of item value : `object` Value to be assigned a type. Can be an iterable. Returns ------- useType : `str` or none Type to use for the supplied value. `None` if the input is `bool` or a non-integral value.
Definition at line 259 of file propertyContainerContinued.py.
|
protected |
Make input iterable. Takes whatever is given to it and yields it back one element at a time. If it is not an iterable or it is a string or PropertySet/List, yields itself.
Definition at line 243 of file propertyContainerContinued.py.
|
protected |
Make a `PropertyList` from the state returned by `getPropertyListState` Parameters ---------- state : `list` The data returned by `getPropertySetState`.
Definition at line 430 of file propertyContainerContinued.py.
|
protected |
Make a `PropertySet` from the state returned by `getPropertySetState` Parameters ---------- state : `list` The data returned by `getPropertySetState`.
Definition at line 417 of file propertyContainerContinued.py.
|
protected |
Add a single Python value of unknown type
Definition at line 393 of file propertyContainerContinued.py.
|
protected |
Return name of the type of a particular element Parameters ---------- container : `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList` Container including the element name : `str` Name of element
Definition at line 168 of file propertyContainerContinued.py.
|
protected |
Get a value of unknown type as a scalar or array Parameters ---------- container : `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList` Container from which to get the value name : `str` Name of item returnStyle : `ReturnStyle` Control whether numeric or string data is returned as an array or scalar (the other types, ``PropertyList``, ``PropertySet`` and ``PersistablePtr``, are always returned as a scalar): - ReturnStyle.ARRAY: return numeric or string data types as an array of values. - ReturnStyle.SCALAR: return numeric or string data types as a single value; if the item has multiple values then return the last value. - ReturnStyle.AUTO: (deprecated) return numeric or string data as a scalar if there is just one item, or as an array otherwise. Raises ------ KeyError Raised if the specified key does not exist in the container. TypeError Raised if the value retrieved is of an unexpected type. ValueError Raised if the value for ``returnStyle`` is not correct.
Definition at line 188 of file propertyContainerContinued.py.
|
protected |
Set a single Python value of unknown type
Definition at line 369 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.getPropertyListState | ( | container, | |
asLists = False ) |
Get the state of a PropertyList in a form that can be pickled. Parameters ---------- container : `PropertyList` The property container. asLists : `bool`, optional If False, the default, `tuple` will be used for the contents. If true a `list` will be used. Returns ------- state : `list` of `tuple` or `list` of `list` The state, as a list of tuples (or lists), each of which contains the following 4 items: name (a `str`): the name of the item elementTypeName (a `str`): the suffix of a ``setX`` method name which is appropriate for the data type. For example integer data has ``elementTypeName="Int"` which corresponds to the ``setInt`` method. value the data for the item, in a form compatible with the set method named by ``elementTypeName`` comment (a `str`): the comment. This item is only present if ``container`` is a PropertyList.
Definition at line 92 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.getPropertySetState | ( | container, | |
asLists = False ) |
Get the state of a PropertySet in a form that can be pickled. Parameters ---------- container : `PropertySet` The property container. asLists : `bool`, optional If False, the default, `tuple` will be used for the contents. If true a `list` will be used. Returns ------- state : `list` of `tuple` or `list` of `list` The state, as a list of tuples (or lists), each of which contains the following 3 items: name (a `str`) the name of the item elementTypeName (a `str`) the suffix of a ``setX`` method name which is appropriate for the data type. For example integer data has ``elementTypeName="Int"` which corresponds to the ``setInt`` method. value the data for the item, in a form compatible with the set method named by ``elementTypeName``
Definition at line 57 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.setPropertyListState | ( | container, | |
state ) |
Restore the state of a PropertyList, in place. Parameters ---------- container : `PropertyList` The property container whose state is to be restored. It should be empty to start with and is updated in place. state : `list` The state, as returned by ``getPropertyListState``
Definition at line 147 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.setPropertySetState | ( | container, | |
state ) |
Restore the state of a PropertySet, in place. Parameters ---------- container : `PropertySet` The property container whose state is to be restored. It should be empty to start with and is updated in place. state : `list` The state, as returned by `getPropertySetState`
Definition at line 129 of file propertyContainerContinued.py.
|
protected |
Definition at line 47 of file propertyContainerContinued.py.
TypeAlias lsst.daf.base.propertyContainer.propertyContainerContinued.NestedMetadataDict = Mapping[str, Union[str, float, int, bool, "NestedMetadataDict"]] |
Definition at line 43 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.type_obj = getattr(PropertySet, "TYPE_" + checkType) |
Definition at line 51 of file propertyContainerContinued.py.