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 | __call__ (self, parser, namespace, values, option_string) |
argparse action callback to process a data ID into a dict.
Definition at line 1177 of file argumentParser.py.
def lsst.pipe.base.argumentParser.IdValueAction.__call__ | ( | self, | |
parser, | |||
namespace, | |||
values, | |||
option_string | |||
) |
Parse ``--id`` data and append results to ``namespace.<argument>.idList``. Parameters ---------- parser : `ArgumentParser` Argument parser. namespace : `argparse.Namespace` Parsed command (an instance of argparse.Namespace). The following attributes are updated: - ``<idName>.idList``, where ``<idName>`` is the name of the ID argument, for instance ``"id"`` for ID argument ``--id``. values : `list` A list of data IDs; see Notes below. option_string : `str` Option value specified by the user. Notes ----- The data format is:: key1=value1_1[^value1_2[^value1_3...] key2=value2_1[^value2_2[^value2_3...]... The values (e.g. ``value1_1``) may either be a string, or of the form ``"int..int"`` (e.g. ``"1..3"``) which is interpreted as ``"1^2^3"`` (inclusive, unlike a python range). So ``"0^2..4^7..9"`` is equivalent to ``"0^2^3^4^7^8^9"``. You may also specify a stride: ``"1..5:2"`` is ``"1^3^5"``. The cross product is computed for keys with multiple values. For example:: --id visit 1^2 ccd 1,1^2,2 results in the following data ID dicts being appended to ``namespace.<argument>.idList``: {"visit":1, "ccd":"1,1"} {"visit":2, "ccd":"1,1"} {"visit":1, "ccd":"2,2"} {"visit":2, "ccd":"2,2"}
Definition at line 1181 of file argumentParser.py.