DatasetArgument

class lsst.pipe.base.DatasetArgument(name=None, help='dataset type to process from input data repository', default=None)

Bases: DynamicDatasetType

Dataset type specified by a command-line argument.

Parameters:
namestr, optional

Name of command-line argument (including leading “–“, if appropriate) whose value is the dataset type. If None, uses --idName_dstype where idName is the name of the data ID argument (e.g. “id”).

helpstr, optional

Help string for the command-line argument.

defaultobject, optional

Default value. If None, then the command-line option is required. This argument isignored if the command-line argument is positional (name does not start with “-”) because positional arguments do not support default values.

Methods Summary

addArgument(parser, idName)

Add a command-line argument to specify the dataset type name.

getDatasetType(namespace)

Get the dataset type as a string, from the appropriate command-line argument.

Methods Documentation

addArgument(parser, idName)

Add a command-line argument to specify the dataset type name.

Parameters:
parserArgumentParser

Argument parser.

idNamestr

Data ID.

Notes

Also sets the name attribute if it is currently None.

getDatasetType(namespace)

Get the dataset type as a string, from the appropriate command-line argument.

Parameters:
namespace

Parsed command.

Returns:
datasetTypestr

Dataset type.