FgcmCalibrateTractRunner¶
-
class
lsst.fgcmcal.
FgcmCalibrateTractRunner
(TaskClass, parsedCmd, doReturnResults=False)¶ Bases:
lsst.pipe.base.ButlerInitializedTaskRunner
Subclass of TaskRunner for FgcmCalibrateTractTask
fgcmCalibrateTractTask.run() takes a number of arguments, one of which is the butler (for persistence and mapper data), and a list of dataRefs extracted from the command line. This task runs on a constrained set of dataRefs, typically a single tract. This class transforms the process arguments generated by the ArgumentParser into the arguments expected by FgcmCalibrateTractTask.run(). This runner does not use any parallelization.
Attributes Summary
TIMEOUT
Methods Summary
__call__
(args)Parameters: getTargetList
(parsedCmd)Return a list with one element: a tuple with the butler and list of dataRefs. makeTask
([parsedCmd, args])A variant of the base version that passes a butler argument to the task’s constructor. precall
(parsedCmd)Hook for code that should run exactly once, before multiprocessing. prepareForMultiProcessing
()Prepare this instance for multiprocessing run
(parsedCmd)Run the task, with no multiprocessing runTask
(task, dataRef, kwargs)Make the actual call to runDataRef
for this task.Attributes Documentation
-
TIMEOUT
= 2592000¶
Methods Documentation
-
__call__
(args)¶ Parameters: - args: `tuple` with (butler, dataRefList)
Returns: - exitStatus: `list` with `lsst.pipe.base.Struct`
exitStatus (0: success; 1: failure) May also contain results if
self.doReturnResults
isTrue
.
-
static
getTargetList
(parsedCmd)¶ Return a list with one element: a tuple with the butler and list of dataRefs.
-
makeTask
(parsedCmd=None, args=None)¶ A variant of the base version that passes a butler argument to the task’s constructor.
Parameters: - parsedCmd :
argparse.Namespace
Parsed command-line options, as returned by the
ArgumentParser
; if specified then args is ignored.- args
Other arguments; if
parsedCmd
isNone
then this must be specified.
Raises: - RuntimeError
Raised if
parsedCmd
andargs
are bothNone
.
- parsedCmd :
-
precall
(parsedCmd)¶ Hook for code that should run exactly once, before multiprocessing.
Notes
Must return True if
TaskRunner.__call__
should subsequently be called.Warning
Implementations must take care to ensure that no unpicklable attributes are added to the TaskRunner itself, for compatibility with multiprocessing.
The default implementation writes package versions, schemas and configs, or compares them to existing files on disk if present.
-
prepareForMultiProcessing
()¶ Prepare this instance for multiprocessing
Optional non-picklable elements are removed.
This is only called if the task is run under multiprocessing.
-
run
(parsedCmd)¶ Run the task, with no multiprocessing
Parameters: - parsedCmd: `lsst.pipe.base.ArgumentParser` parsed command line
-
runTask
(task, dataRef, kwargs)¶ Make the actual call to
runDataRef
for this task.Parameters: - task :
lsst.pipe.base.CmdLineTask
class The class of the task to run.
- dataRef
Butler data reference that contains the data the task will process.
- kwargs
Any additional keyword arguments. See
TaskRunner.getTargetList
above.
Notes
The default implementation of
TaskRunner.runTask
works for any command-line task which has a runDataRef method that takes a data reference and an optional set of additional keyword arguments. This method returns the results generated by the task’srunDataRef
method.- task :
-