lsst.pipe.base

The lsst.pipe.base module provides base classes for the task framework. Tasks package the algorithmic units of the LSST Science Pipelines. You can create, configure, and run tasks with their Python APIs. Some tasks, called command-line tasks, are also packaged into data processing pipelines that you can run from the command line.

Developing tasks and command-line tasks

Python API reference

lsst.pipe.base Package

Functions

InitInputDatasetField(*, doc, storageClass) Factory function to create Config class instances of InitInputDatasetConfig
InitOutputDatasetField(*, doc, storageClass) Factory function to create Config class instances of InitOutputDatasetConfig
InputDatasetField(*, doc, dimensions, …[, …]) Factory function to create Config class instances of InputDatasetConfig
OutputDatasetField(*, doc, dimensions, …) Factory function to create Config class instances of OutputDatasetConfig
logInfo(obj, prefix[, logLevel]) Log timer information to obj.metadata and obj.log.
timeMethod(func) Decorator to measure duration of a task method.

Classes

ArgumentParser(name[, usage]) Argument parser for command-line tasks that is based on argparse.ArgumentParser.
ButlerInitializedTaskRunner(TaskClass, parsedCmd) A TaskRunner for CmdLineTasks that require a butler keyword argument to be passed to their constructor.
CmdLineTask([config, name, parentTask, log]) Base class for command-line tasks: tasks that may be executed from the command-line.
ConfigDatasetType(name) Dataset type specified by a config parameter.
ConfigFileAction(option_strings, dest[, …]) argparse action to load config overrides from one or more files.
ConfigValueAction(option_strings, dest[, …]) argparse action callback to override config parameters using name=value pairs from the command-line.
DataIdContainer([level]) Container for data IDs and associated data references.
DatasetArgument([name, help, default]) Dataset type specified by a command-line argument.
DatasetTypeDescriptor(datasetType, scalar) Describe DatasetType and its options for PipelineTask.
GraphBuilder(taskFactory, registry[, …]) GraphBuilder class is responsible for building task execution graph from a Pipeline.
InitInputDatasetConfig
InitOutputDatasetConfig
InputDatasetConfig
InputOnlyArgumentParser(name[, usage]) ArgumentParser for command-line tasks that don’t write any output.
LegacyTaskRunner(TaskClass, parsedCmd[, …]) A TaskRunner for CmdLineTasks which calls the Task’s run method on a dataRef rather than the runDataRef method.
OutputDatasetConfig
Pipeline([iterable]) Pipeline is a sequence of TaskDef objects.
PipelineBuilder(taskFactory[, pipeline]) PipelineBuilder class is responsible for building task pipeline.
PipelineTask(*[, config, log, initInputs]) Base class for all pipeline tasks.
PipelineTaskConfig Base class for all PipelineTask configurations.
QuantumConfig Configuration class which defines PipelineTask quanta dimensions.
QuantumGraph([iterable]) QuantumGraph is a sequence of QuantumGraphTaskNodes objects.
QuantumGraphTaskNodes(taskDef, quanta) QuantumGraphTaskNodes represents a bunch of nodes in an quantum graph corresponding to a single task.
QuantumIterData(quantumId, quantum, taskDef, …) Helper class for iterating over quanta in a graph.
ResourceConfig Configuration for resource requirements.
Struct(**keyArgs) A container to which you can add fields as attributes.
Task([config, name, parentTask, log]) Base class for data processing tasks.
TaskDef(taskName, config[, taskClass, label]) TaskDef is a collection of information about task needed by Pipeline.
TaskError Use to report errors for which a traceback is not useful.
TaskFactory Abstract base class for task factory.
TaskRunner(TaskClass, parsedCmd[, …]) Run a command-line task, using multiprocessing if requested.

Class Inheritance Diagram

Inheritance diagram of lsst.pipe.base.argumentParser.ArgumentParser, lsst.pipe.base.cmdLineTask.ButlerInitializedTaskRunner, lsst.pipe.base.cmdLineTask.CmdLineTask, lsst.pipe.base.argumentParser.ConfigDatasetType, lsst.pipe.base.argumentParser.ConfigFileAction, lsst.pipe.base.argumentParser.ConfigValueAction, lsst.pipe.base.argumentParser.DataIdContainer, lsst.pipe.base.argumentParser.DatasetArgument, lsst.pipe.base.pipelineTask.DatasetTypeDescriptor, lsst.pipe.base.graphBuilder.GraphBuilder, lsst.pipe.base.config.InitInputDatasetConfig, lsst.pipe.base.config.InitOutputDatasetConfig, lsst.pipe.base.config.InputDatasetConfig, lsst.pipe.base.argumentParser.InputOnlyArgumentParser, lsst.pipe.base.cmdLineTask.LegacyTaskRunner, lsst.pipe.base.config.OutputDatasetConfig, lsst.pipe.base.pipeline.Pipeline, lsst.pipe.base.pipelineBuilder.PipelineBuilder, lsst.pipe.base.pipelineTask.PipelineTask, lsst.pipe.base.config.PipelineTaskConfig, lsst.pipe.base.config.QuantumConfig, lsst.pipe.base.graph.QuantumGraph, lsst.pipe.base.graph.QuantumGraphTaskNodes, lsst.pipe.base.graph.QuantumIterData, lsst.pipe.base.config.ResourceConfig, lsst.pipe.base.struct.Struct, lsst.pipe.base.task.Task, lsst.pipe.base.pipeline.TaskDef, lsst.pipe.base.task.TaskError, lsst.pipe.base.taskFactory.TaskFactory, lsst.pipe.base.cmdLineTask.TaskRunner