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
|
Public Member Functions | |
from_mapping (cls, metadata) | |
get (self, name, default=None) | |
getArray (self, name) | |
getScalar (self, name) | |
set (self, name, value) | |
add (self, name, value) | |
update (self, addition) | |
toDict (self) | |
__eq__ (self, other) | |
__copy__ (self) | |
__deepcopy__ (self, memo) | |
__contains__ (self, name) | |
__setitem__ (self, name, value) | |
__getitem__ (self, name) | |
__delitem__ (self, name) | |
__str__ (self) | |
__len__ (self) | |
__iter__ (self) | |
keys (self) | |
items (self) | |
values (self) | |
pop (self, name, default=None) | |
__reduce__ (self) | |
NestedMetadataDict | get_dict (self, str key) |
None | set_dict (self, str key, NestedMetadataDict value) |
Protected Attributes | |
_typeMenu | |
Static Protected Attributes | |
dict | _typeMenu |
Definition at line 445 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__contains__ | ( | self, | |
name ) |
Determines if the name is found at the top level hierarchy of the container. Notes ------ Does not use `PropertySet.exists()`` because that includes support for "."-delimited names. This method is consistent with the items returned from ``__iter__``.
Definition at line 688 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__copy__ | ( | self | ) |
Definition at line 676 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__deepcopy__ | ( | self, | |
memo ) |
Definition at line 683 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__delitem__ | ( | self, | |
name ) |
Definition at line 734 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__eq__ | ( | self, | |
other ) |
Definition at line 652 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__getitem__ | ( | self, | |
name ) |
Returns a scalar item from the container. Notes ----- Uses `PropertySet.getScalar` to guarantee that a single value will be returned.
Definition at line 724 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__iter__ | ( | self | ) |
Definition at line 747 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__len__ | ( | self | ) |
Definition at line 744 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__reduce__ | ( | self | ) |
Definition at line 789 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__setitem__ | ( | self, | |
name, | |||
value ) |
Assigns the supplied value to the container. Parameters ---------- name : `str` Name of item to update. value : Value to assign Can be any value supported by the container's ``set()`` method. `~collections.abc.Mapping` are converted to `PropertySet` before assignment. Notes ----- Uses `PropertySet.set`, overwriting any previous value.
Definition at line 700 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__str__ | ( | self | ) |
Definition at line 741 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.add | ( | self, | |
name, | |||
value ) |
Append one or more values to a given item, which need not exist If the item exists then the new value(s) are appended; otherwise it is like calling `set` Parameters ---------- name : `str` Name of item value : any supported type Value of item; may be a scalar or array Notes ----- If ``value`` is an `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList` then ``value`` replaces the existing value. Also the item is added as a live reference, so updating ``value`` will update this container and vice-versa. Raises ------ lsst::pex::exceptions::TypeError Raised if the type of `value` is incompatible with the existing value of the item.
Definition at line 580 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.from_mapping | ( | cls, | |
metadata ) |
Create a `PropertySet` from a mapping or dict-like object. Parameters ---------- metadata : `collections.abc.Mapping` Metadata from which to create the `PropertySet`. Can be a mapping, a `~dataclasses.dataclass` or anything that supports ``toDict()``, ``to_dict()`` or ``dict()`` method. It is assumed that the dictionary is expanded recursively by these methods or that the Python type can be understood by `PropertySet`. Returns ------- ps : `PropertySet` The new `PropertySet`.
Definition at line 458 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.get | ( | self, | |
name, | |||
default = None ) |
Return an item as a scalar, else default. Identical to `getScalar` except that a default value is returned if the requested key is not present. If an array item is requested the final value in the array will be returned. Parameters ---------- name : `str` Name of item default : `object`, optional Default value to use if the named item is not present. Returns ------- value : any type supported by container Single value of any type supported by the container, else the default value if the requested item is not present in the container. For array items the most recently added value is returned.
Definition at line 492 of file propertyContainerContinued.py.
NestedMetadataDict lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.get_dict | ( | self, | |
str | key ) |
Return a possibly-hierarchical nested `dict`. This implements the `lsst.pipe.base.GetDictMetadata` protocol for consistency with `lsst.pipe.base.TaskMetadata` and `PropertyList`. Parameters ---------- key : `str` String key associated with the mapping. May not have a ``.`` character. Returns ------- value : `~collections.abc.Mapping` Possibly-nested mapping, with `str` keys and values that are `int`, `float`, `str`, `bool`, or another `dict` with the same key and value types. Will be empty if ``key`` does not exist. Raises ------ TypeError Raised if the value associated with this key is not a nested dictionary, but does exist. Note that this behavior is not consistent with `PropertyList` (which returns an empty `dict`).
Definition at line 797 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.getArray | ( | self, | |
name ) |
Return an item as an array if the item is numeric or string If the item is a `PropertySet`, `PropertyList` or `lsst.daf.base.PersistablePtr` then return the item as a scalar. Parameters ---------- name : `str` Name of item Returns ------- values : `list` of any type supported by container The contents of the item, guaranteed to be returned as a `list.` Raises ------ KeyError Raised if the item does not exist.
Definition at line 519 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.getScalar | ( | self, | |
name ) |
Return an item as a scalar If the item has more than one value then the last value is returned. Parameters ---------- name : `str` Name of item Returns ------- value : scalar item Value stored in the item. If the item refers to an array the most recently added value is returned. Raises ------ KeyError Raised if the item does not exist.
Definition at line 542 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.items | ( | self | ) |
Definition at line 754 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.keys | ( | self | ) |
Definition at line 751 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.pop | ( | self, | |
name, | |||
default = None ) |
Remove the named key and return its value. Parameters ---------- name : `str` Name of the key to remove. Can be hierarchical. default : Any, optional Value to return if the key is not present. Returns ------- value : Any The value of the item as would be returned using `getScalar()`. Raises ------ KeyError Raised if no default is given and the key is missing.
Definition at line 760 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.set | ( | self, | |
name, | |||
value ) |
Set the value of an item If the item already exists it is silently replaced; the types need not match. Parameters ---------- name : `str` Name of item value : any supported type Value of item; may be a scalar or array
Definition at line 565 of file propertyContainerContinued.py.
None lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.set_dict | ( | self, | |
str | key, | ||
NestedMetadataDict | value ) |
Assign a possibly-hierarchical nested `dict`. This implements the `lsst.pipe.base.SetDictMetadata` protocol for consistency with `lsst.pipe.base.TaskMetadata` and `PropertyList`. Parameters ---------- key : `str` String key associated with the mapping. May not have a ``.`` character. value : `~collections.abc.Mapping` Possibly-nested mapping, with `str` keys and values that are `int`, `float`, `str`, `bool`, or another `dict` with the same key and value types. May not have a ``.`` character.
Definition at line 828 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.toDict | ( | self | ) |
Returns a (possibly nested) dictionary with all properties. Returns ------- d : `dict` Dictionary with all names and values (no comments).
Definition at line 633 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.update | ( | self, | |
addition ) |
Update the current container with the supplied additions. Parameters ---------- addition : `collections.abc.Mapping` or `PropertySet` The content to merge into the current container. Notes ----- This is not the same as calling `PropertySet.combine` since the behavior differs when both mappings contain the same key. This method updates by overwriting existing values completely with the new value.
Definition at line 609 of file propertyContainerContinued.py.
lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.values | ( | self | ) |
Definition at line 757 of file propertyContainerContinued.py.
|
staticprotected |
Definition at line 448 of file propertyContainerContinued.py.
|
protected |
Definition at line 578 of file propertyContainerContinued.py.