lsst.daf.base
17.0.1-3-gb5ca14a
|
Public Member Functions | |
def | get (self, name, default=None) |
def | getArray (self, name) |
def | getScalar (self, name) |
def | set (self, name, value) |
def | add (self, name, value) |
def | update (self, addition) |
def | toDict (self) |
def | __eq__ (self, other) |
def | __copy__ (self) |
def | __deepcopy__ (self, memo) |
def | __contains__ (self, name) |
def | __setitem__ (self, name, value) |
def | __getitem__ (self, name) |
def | __delitem__ (self, name) |
def | __str__ (self) |
def | __len__ (self) |
def | __iter__ (self) |
def | keys (self) |
def | __reduce__ (self) |
Definition at line 330 of file propertyContainerContinued.py.
def 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 528 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__copy__ | ( | self | ) |
Definition at line 516 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__deepcopy__ | ( | self, | |
memo | |||
) |
Definition at line 523 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__delitem__ | ( | self, | |
name | |||
) |
Definition at line 574 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__eq__ | ( | self, | |
other | |||
) |
Definition at line 500 of file propertyContainerContinued.py.
def 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 564 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__iter__ | ( | self | ) |
Definition at line 586 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__len__ | ( | self | ) |
Definition at line 583 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__reduce__ | ( | self | ) |
Definition at line 593 of file propertyContainerContinued.py.
def 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 540 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__str__ | ( | self | ) |
Definition at line 580 of file propertyContainerContinued.py.
def 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 430 of file propertyContainerContinued.py.
def 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 342 of file propertyContainerContinued.py.
def 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 369 of file propertyContainerContinued.py.
def 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 392 of file propertyContainerContinued.py.
def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.keys | ( | self | ) |
Definition at line 590 of file propertyContainerContinued.py.
def 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 415 of file propertyContainerContinued.py.
def 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 481 of file propertyContainerContinued.py.
def 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 ----- If the supplied parameter is a `PropertySet` then the `PropertySet.combine` method will be used. If the supplied parameter is a `collections.abc.Mapping` each item will be copied out of the mapping and value assigned using `PropertySet.set`, overwriting any previous values.
Definition at line 459 of file propertyContainerContinued.py.