lsst.pipe.tasks  21.0.0-15-g986934a8+2928135b22
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.exampleCmdLineTask.ExampleCmdLineTask Class Reference

Example command-line task that computes simple statistics on an image. More...

Inheritance diagram for lsst.pipe.tasks.exampleCmdLineTask.ExampleCmdLineTask:

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
 

Detailed Description

Example command-line task that computes simple statistics on an image.

Contents

Description

Example command-line task that computes simple statistics on an image.

This task was written as an example for the documents pipeTasks_writeTask and pipeTasks_writeCmdLineTask. 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.

Configuration parameters

See ExampleCmdLineConfig

Debug variables

This task supports the following debug variables:

display
If True then display the exposure in current display backend

To enable debugging, see Using lsstDebug to control debugging output.

A complete example of using ExampleCmdLineTask

This code is in examples/exampleCmdLineTask.py, and can be run as follows:

examples/exampleCmdLineTask.py $OBS_TEST_DIR/data/input --id
# that will process all data; you can also try any combination of these flags:
--id filter=g
--config doFail=True --doraise
--show config data

Definition at line 54 of file exampleCmdLineTask.py.

Constructor & Destructor Documentation

◆ __init__()

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 107 of file exampleCmdLineTask.py.

Member Function Documentation

◆ runDataRef()

def lsst.pipe.tasks.exampleCmdLineTask.ExampleCmdLineTask.runDataRef (   self,
  dataRef 
)

Compute a few statistics on the image plane of an exposure.

Parameters
dataRefdata reference for a calibrated science exposure ("calexp")
Returns
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 116 of file exampleCmdLineTask.py.

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.exampleCmdLineTask.ExampleCmdLineTask.ConfigClass
static

Definition at line 104 of file exampleCmdLineTask.py.


The documentation for this class was generated from the following file: