|
lsst.daf.base
19.0.0-1-g49a97f9+2
|
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 | items (self) |
| def | values (self) |
| def | __reduce__ (self) |
Definition at line 340 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 540 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__copy__ | ( | self | ) |
Definition at line 528 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__deepcopy__ | ( | self, | |
| memo | |||
| ) |
Definition at line 535 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__delitem__ | ( | self, | |
| name | |||
| ) |
Definition at line 586 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__eq__ | ( | self, | |
| other | |||
| ) |
Definition at line 512 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 576 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__iter__ | ( | self | ) |
Definition at line 598 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__len__ | ( | self | ) |
Definition at line 595 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__reduce__ | ( | self | ) |
Definition at line 611 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 552 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.__str__ | ( | self | ) |
Definition at line 592 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 440 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 352 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 379 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 402 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.items | ( | self | ) |
Definition at line 605 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.keys | ( | self | ) |
Definition at line 602 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 425 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 493 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
-----
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 469 of file propertyContainerContinued.py.
| def lsst.daf.base.propertyContainer.propertyContainerContinued.PropertySet.values | ( | self | ) |
Definition at line 608 of file propertyContainerContinued.py.
1.8.13