NonexistentDatasetTaskDataIdContainer

class lsst.cp.pipe.utils.NonexistentDatasetTaskDataIdContainer(level=None)

Bases: lsst.pipe.base.DataIdContainer

A DataIdContainer for the tasks for which the output does not yet exist.

Methods Summary

castDataIds(butler) Validate data IDs and cast them to the correct type (modify idList in place).
makeDataRefList(namespace) Compute refList based on idList.
setDatasetType(datasetType) Set actual dataset type, once it is known.

Methods Documentation

castDataIds(butler)

Validate data IDs and cast them to the correct type (modify idList in place).

This code casts the values in the data IDs dicts in dataIdList to the type required by the butler. Data IDs are read from the command line as str, but the butler requires some values to be other types. For example “visit” values should be int.

Parameters:
butler : lsst.daf.persistence.Butler

Data butler.

makeDataRefList(namespace)

Compute refList based on idList.

This method must be defined as the dataset does not exist before this task is run.

Parameters:
namespace

Results of parsing the command-line.

Notes

Not called if add_id_argument called with doMakeDataRefList=False. Note that this is almost a copy-and-paste of the vanilla implementation, but without checking if the datasets already exist, as this task exists to make them.

setDatasetType(datasetType)

Set actual dataset type, once it is known.

Parameters:
datasetType : str

Dataset type.

Notes

The reason datasetType is not a constructor argument is that some subclasses do not know the dataset type until the command is parsed. Thus, to reduce special cases in the code, datasetType is always set after the command is parsed.