lsst.pipe.tasks g0537c5b946+cdd9f7abd8
|
Example command-line task that computes simple statistics on an image. More...
Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | runDataRef (self, dataRef) |
Compute a few statistics on the image plane of an exposure. More... | |
Static Public Attributes | |
ConfigClass = ExampleCmdLineConfig | |
Example command-line task that computes simple statistics on an image.
Example command-line task that computes simple statistics on an image.
This task was written as an example for the documents Creating a task and Creating a command-line task. The task reads in a "calexp" (a calibrated science exposure), computes statistics on the image plane, and logs and returns the statistics. In addition, if debugging is enabled, it displays the image in current display backend.
The image statistics are computed using a subtask, in order to show how to call subtasks and how to retarget (replace) them with variant subtasks.
The main method is runDataRef.
This task supports the following debug variables:
display
To enable debugging, see the lsstDebug documentation.
This code is in examples/exampleCmdLineTask.py, and can be run as follows:
Definition at line 55 of file exampleCmdLineTask.py.
def lsst.pipe.tasks.exampleCmdLineTask.ExampleCmdLineTask.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Construct an ExampleCmdLineTask Call the parent class constructor and make the "stats" subtask from the config field of the same name.
Definition at line 113 of file exampleCmdLineTask.py.
def lsst.pipe.tasks.exampleCmdLineTask.ExampleCmdLineTask.runDataRef | ( | self, | |
dataRef | |||
) |
Compute a few statistics on the image plane of an exposure.
@param dataRef: data reference for a calibrated science exposure ("calexp") @return a pipeBase Struct containing: - mean: mean of image plane - meanErr: uncertainty in mean - stdDev: standard deviation of image plane - stdDevErr: uncertainty in standard deviation
Definition at line 122 of file exampleCmdLineTask.py.
|
static |
Definition at line 110 of file exampleCmdLineTask.py.