lsst.pipe.base
14.0-6-ge2c9487+48
|
Classes | |
class | ArgumentParser |
class | ConfigDatasetType |
class | ConfigFileAction |
class | ConfigValueAction |
class | DataIdArgument |
class | DataIdContainer |
class | DatasetArgument |
class | DynamicDatasetType |
class | IdValueAction |
class | InputOnlyArgumentParser |
class | LogLevelAction |
class | ReuseAction |
Functions | |
def | getTaskDict (config, taskDict=None, baseName="") |
def | obeyShowArgument (showOpts, config=None, exit=False) |
def | showTaskHierarchy (config) |
def | setDottedAttr (item, name, value) |
def | getDottedAttr (item, name) |
def | dataExists (butler, datasetType, dataRef) |
Variables | |
string | DEFAULT_INPUT_NAME = "PIPE_INPUT_ROOT" |
string | DEFAULT_CALIB_NAME = "PIPE_CALIB_ROOT" |
string | DEFAULT_OUTPUT_NAME = "PIPE_OUTPUT_ROOT" |
def lsst.pipe.base.argumentParser.dataExists | ( | butler, | |
datasetType, | |||
dataRef | |||
) |
Determine if data exists at the current level or any data exists at a deeper level. Parameters ---------- butler : `lsst.daf.persistence.Butler` The Butler. datasetType : `str` Dataset type. dataRef : `lsst.daf.persistence.ButlerDataRef` Butler data reference. Returns ------- exists : `bool` Return value is `True` if data exists, `False` otherwise.
Definition at line 1227 of file argumentParser.py.
def lsst.pipe.base.argumentParser.getDottedAttr | ( | item, | |
name | |||
) |
Get an attribute (like `getattr` but accepts hierarchical names such as ``foo.bar.baz``). Parameters ---------- item : obj Object whose attribute is to be returned. name : `str` Name of the attribute to get. Returns ------- itemAttr : obj If name is ``foo.bar.baz then the return value is ``item.foo.bar.baz``.
Definition at line 1206 of file argumentParser.py.
def lsst.pipe.base.argumentParser.getTaskDict | ( | config, | |
taskDict = None , |
|||
baseName = "" |
|||
) |
Get a dictionary of task info for all subtasks in a config Parameters ---------- config : `lsst.pex.config.Config` Configuration to process. taskDict : `dict`, optional Users should not specify this argument. Supports recursion; if provided, taskDict is updated in place, else a new `dict` is started). baseName : `str`, optional Users should not specify this argument. It is only used for recursion: if a non-empty string then a period is appended and the result is used as a prefix for additional entries in taskDict; otherwise no prefix is used. Returns ------- taskDict : `dict` Keys are config field names, values are task names. Notes ----- This function is designed to be called recursively. The user should call with only a config (leaving taskDict and baseName at their default values).
Definition at line 834 of file argumentParser.py.
def lsst.pipe.base.argumentParser.obeyShowArgument | ( | showOpts, | |
config = None , |
|||
exit = False |
|||
) |
Process arguments specified with ``--show`` (but ignores ``"data"``). Parameters ---------- showOpts : `list` of `str` List of options passed to ``--show``. config : optional The provided config. exit : bool, optional Exit if ``"run"`` isn't included in ``showOpts``. Parameters ---------- Supports the following options in showOpts: - ``config[=PAT]``. Dump all the config entries, or just the ones that match the glob pattern. - ``history=PAT``. Show where the config entries that match the glob pattern were set. - ``tasks``. Show task hierarchy. - ``data``. Ignored; to be processed by caller. - ``run``. Keep going (the default behaviour is to exit if --show is specified). Calls ``sys.exit(1)`` if any other option found.
Definition at line 875 of file argumentParser.py.
def lsst.pipe.base.argumentParser.setDottedAttr | ( | item, | |
name, | |||
value | |||
) |
Set an instance attribute (like `setattr` but accepting hierarchical names such as ``foo.bar.baz``). Parameters ---------- item : obj Object whose attribute is to be set. name : `str` Name of attribute to set. value : obj New value for the attribute. Notes ----- For example if name is ``foo.bar.baz`` then ``item.foo.bar.baz`` is set to the specified value.
Definition at line 1183 of file argumentParser.py.
def lsst.pipe.base.argumentParser.showTaskHierarchy | ( | config | ) |
Print task hierarchy to stdout. Parameters ---------- config : `lsst.pex.config.Config` Configuration to process.
Definition at line 980 of file argumentParser.py.
string lsst.pipe.base.argumentParser.DEFAULT_CALIB_NAME = "PIPE_CALIB_ROOT" |
Definition at line 51 of file argumentParser.py.
string lsst.pipe.base.argumentParser.DEFAULT_INPUT_NAME = "PIPE_INPUT_ROOT" |
Definition at line 50 of file argumentParser.py.
string lsst.pipe.base.argumentParser.DEFAULT_OUTPUT_NAME = "PIPE_OUTPUT_ROOT" |
Definition at line 52 of file argumentParser.py.