LSST Applications g07dc498a13+cb17356775,g1409bbee79+cb17356775,g1a7e361dbc+cb17356775,g1fd858c14a+d1a2a640a9,g33399d78f5+fe6948661d,g35bb328faa+e55fef2c71,g3bd4b5ce2c+cac9e18807,g3c79e8cd92+2359a18b76,g43bc871e57+a58ba40925,g53246c7159+e55fef2c71,g60b5630c4e+8133a3545f,g78460c75b0+8427c4cc8f,g78619a8342+55305cb8f0,g786e29fd12+307f82e6af,g8534526c7b+8e1c6b434f,g89139ef638+cb17356775,g8b49a6ea8e+8133a3545f,g8ffcb69f3d+818ab6c36e,g9125e01d80+e55fef2c71,g97b8272a79+98425f45f6,g989de1cb63+cb17356775,g9f33ca652e+4245ceb508,gaaedd4e678+cb17356775,gabe3b4be73+9c0c3c7524,gb1101e3267+3e5ef1d639,gb58c049af0+28045f66fd,gc1fe0db326+8133a3545f,gca43fec769+e55fef2c71,gcf25f946ba+fe6948661d,gd397e13551+64039f84ea,gd6cbbdb0b4+f6e5445f66,gde0f65d7ad+7eb368c542,ge278dab8ac+b4c2c8faf7,geab183fbe5+8133a3545f,gecb8035dfe+1f480bec5e,gefa07fa684+e7bc33f3ea,gf58bf46354+e55fef2c71,gfe7187db8c+e55afb4430,w.2025.03
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.pex.config.convert Namespace Reference

Functions

 _helper (ps, prefix, dict_)
 
 makePropertySet (config)
 

Variables

 dafBase = None
 

Function Documentation

◆ _helper()

lsst.pex.config.convert._helper ( ps,
prefix,
dict_ )
protected

Definition at line 36 of file convert.py.

36def _helper(ps, prefix, dict_):
37 for k, v in dict_.items():
38 name = prefix + "." + k if prefix is not None else k
39 if isinstance(v, dict):
40 _helper(ps, name, v)
41 elif v is not None:
42 ps.set(name, v)
43
44
PersistenceHelper _helper
Definition Exposure.cc:219

◆ makePropertySet()

lsst.pex.config.convert.makePropertySet ( config)
Convert a configuration into a `lsst.daf.base.PropertySet`.

Parameters
----------
config : `lsst.pex.config.Config`
    Configuration instance.

Returns
-------
propertySet : `lsst.daf.base.PropertySet`
    A `~lsst.daf.base.PropertySet` that is equivalent to the ``config``
    instance. If ``config`` is `None` then this return value is also
    `None`.

See Also
--------
lsst.daf.base.PropertySet

Definition at line 45 of file convert.py.

45def makePropertySet(config):
46 """Convert a configuration into a `lsst.daf.base.PropertySet`.
47
48 Parameters
49 ----------
50 config : `lsst.pex.config.Config`
51 Configuration instance.
52
53 Returns
54 -------
55 propertySet : `lsst.daf.base.PropertySet`
56 A `~lsst.daf.base.PropertySet` that is equivalent to the ``config``
57 instance. If ``config`` is `None` then this return value is also
58 `None`.
59
60 See Also
61 --------
62 lsst.daf.base.PropertySet
63 """
64 if dafBase is None:
65 raise RuntimeError("lsst.daf.base is not available")
66
67 if config is not None:
69 _helper(ps, None, config.toDict())
70 return ps
71 else:
72 return None
Class for storing generic metadata.
Definition PropertySet.h:66

Variable Documentation

◆ dafBase

lsst.pex.config.convert.dafBase = None

Definition at line 33 of file convert.py.