LSST Applications
22.0.1,22.0.1+01bcf6a671,22.0.1+046ee49490,22.0.1+05c7de27da,22.0.1+0c6914dbf6,22.0.1+1220d50b50,22.0.1+12fd109e95,22.0.1+1a1dd69893,22.0.1+1c910dc348,22.0.1+1ef34551f5,22.0.1+30170c3d08,22.0.1+39153823fd,22.0.1+611137eacc,22.0.1+771eb1e3e8,22.0.1+94e66cc9ed,22.0.1+9a075d06e2,22.0.1+a5ff6e246e,22.0.1+a7db719c1a,22.0.1+ba0d97e778,22.0.1+bfe1ee9056,22.0.1+c4e1e0358a,22.0.1+cc34b8281e,22.0.1+d640e2c0fa,22.0.1+d72a2e677a,22.0.1+d9a6b571bd,22.0.1+e485e9761b,22.0.1+ebe8d3385e
LSST Data Management Base Package
|
Public Member Functions | |
def | add_id_argument (self, name, datasetType, help, level=None, doMakeDataRefList=True, ContainerClass=DataIdContainer) |
def | parse_args (self, config, args=None, log=None, override=None) |
def | handleCamera (self, namespace) |
def | convert_arg_line_to_args (self, arg_line) |
def | addReuseOption (self, choices) |
Static Public Attributes | |
bool | requireOutput = False |
`ArgumentParser` for command-line tasks that don't write any output.
Definition at line 918 of file argumentParser.py.
|
inherited |
Add a data ID argument. Parameters ---------- name : `str` Data ID argument (including leading dashes, if wanted). datasetType : `str` or `DynamicDatasetType`-type Type of dataset. Supply a string for a fixed dataset type. For a dynamically determined dataset type, supply a `DynamicDatasetType`, such a `DatasetArgument`. help : `str` Help string for the argument. level : `str` The lowest hierarchy level to descend to for this dataset type, for example `"amp"` for `"raw"` or `"ccd"` for `"calexp"`. Use `""` to use the mapper's default for the dataset type. Some container classes may also support `None`, which means the level should not be restricted; however the default class, `DataIdContainer`, does not support `None`. doMakeDataRefList : bool, optional If `True` (default), construct data references. ContainerClass : `class`, optional Class to contain data IDs and data references; the default class `DataIdContainer` will work for many, but not all, cases. For example if the dataset type is specified on the command line then use `DynamicDatasetType`. Notes ----- If ``datasetType`` is an instance of `DatasetArgument`, then add a second argument to specify the dataset type. The associated data is put into ``namespace.<dataIdArgument.name>`` as an instance of `ContainerClass`; the container includes fields: - ``idList``: a list of data ID dicts. - ``refList``: a list of `~lsst.daf.persistence.Butler` data references (empty if ``doMakeDataRefList`` is `False`).
Definition at line 512 of file argumentParser.py.
|
inherited |
Add a "--reuse-outputs-from SUBTASK" option to the argument parser. CmdLineTasks that can be restarted at an intermediate step using outputs from earlier (but still internal) steps should use this method to allow the user to control whether that happens when outputs from earlier steps are present. Parameters ---------- choices : sequence A sequence of string names (by convention, top-level subtasks) that identify the steps that could be skipped when their outputs are already present. The list is ordered, so when the user specifies one step on the command line, all previous steps may be skipped as well. In addition to the choices provided, users may pass "all" to indicate that all steps may be thus skipped. When this method is called, the ``namespace`` object returned by ``parse_args`` will contain a ``reuse`` attribute containing a list of all steps that should be skipped if their outputs are already present. If no steps should be skipped, the ``reuse`` will be an empty list.
Definition at line 884 of file argumentParser.py.
|
inherited |
Allow files of arguments referenced by ``@<path>`` to contain multiple values on each line. Parameters ---------- arg_line : `str` Line of text read from an argument file.
Definition at line 867 of file argumentParser.py.
|
inherited |
Perform camera-specific operations before parsing the command-line. Parameters ---------- namespace : `argparse.Namespace` Namespace (an ) with the following fields: - ``camera``: the camera name. - ``config``: the config passed to parse_args, with no overrides applied. - ``obsPkg``: the ``obs_`` package for this camera. - ``log``: a `lsst.log` Log. Notes ----- The default implementation does nothing.
Definition at line 847 of file argumentParser.py.
|
inherited |
Parse arguments for a command-line task. Parameters ---------- config : `lsst.pex.config.Config` Config for the task being run. args : `list`, optional Argument list; if `None` then ``sys.argv[1:]`` is used. log : `lsst.log.Log`, optional `~lsst.log.Log` instance; if `None` use the default log. override : callable, optional A config override function. It must take the root config object as its only argument and must modify the config in place. This function is called after camera-specific overrides files are applied, and before command-line config overrides are applied (thus allowing the user the final word). Returns ------- namespace : `argparse.Namespace` A `~argparse.Namespace` instance containing fields: - ``camera``: camera name. - ``config``: the supplied config with all overrides applied, validated and frozen. - ``butler``: a `lsst.daf.persistence.Butler` for the data. - An entry for each of the data ID arguments registered by `add_id_argument`, of the type passed to its ``ContainerClass`` keyword (`~lsst.pipe.base.DataIdContainer` by default). It includes public elements ``idList`` and ``refList``. - ``log``: a `lsst.log` Log. - An entry for each command-line argument, with the following exceptions: - config is the supplied config, suitably updated. - configfile, id and loglevel are all missing. - ``obsPkg``: name of the ``obs_`` package for this camera.
Definition at line 577 of file argumentParser.py.
|
static |
Definition at line 922 of file argumentParser.py.