LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.processCcd.ProcessCcdTask Class Reference

Assemble raw data, fit the PSF, detect and measure, and fit WCS and zero-point. More...

Inheritance diagram for lsst.pipe.tasks.processCcd.ProcessCcdTask:

Public Member Functions

def __init__ (self, butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None, **kwargs)
 
def runDataRef (self, sensorRef)
 

Static Public Attributes

 ConfigClass
 
 RunnerClass
 

Detailed Description

Assemble raw data, fit the PSF, detect and measure, and fit WCS and zero-point.

Contents

Description

Perform the following operations:

Task initialisation

Parameters
[in]butlerThe butler is passed to the refObjLoader constructor in case it is needed. Ignored if the refObjLoader argument provides a loader directly.
[in]psfRefObjLoaderAn instance of LoadReferenceObjectsTasks that supplies an external reference catalog for image characterization. May be None if the desired loader can be constructed from the butler argument or all steps requiring a catalog are disabled.
[in]astromRefObjLoaderAn instance of LoadReferenceObjectsTasks that supplies an external reference catalog for astrometric calibration. May be None if the desired loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled.
[in]photoRefObjLoaderAn instance of LoadReferenceObjectsTasks that supplies an external reference catalog for photometric calibration. May be None if the desired loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled.
[in,out]kwargsother keyword arguments for lsst.pipe.base.CmdLineTask

Invoking the Task

This task is primarily designed to be run from the command line.

The main method is runDataRef, which takes a single butler data reference for the raw input data.

Configuration parameters

See ProcessCcdConfig

Debug variables

ProcessCcdTask has no debug output, but its subtasks do.

A complete example of using ProcessCcdTask

The following commands will process all raw data in obs_test's data repository. Note: be sure to specify an --output that does not already exist:

setup obs_test
setup pipe_tasks
processCcd.py $OBS_TEST_DIR/data/input --output processCcdOut --id

The data is read from the small repository in the obs_test package and written ./processCcdOut (or whatever output you specified). Specifying --id with no values processes all data. Add the option --help to see more options.

Definition at line 77 of file processCcd.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.processCcd.ProcessCcdTask.__init__ (   self,
  butler = None,
  psfRefObjLoader = None,
  astromRefObjLoader = None,
  photoRefObjLoader = None,
**  kwargs 
)
Parameters
[in]butlerThe butler is passed to the refObjLoader constructor in case it is needed. Ignored if the refObjLoader argument provides a loader directly.
[in]psfRefObjLoaderAn instance of LoadReferenceObjectsTasks that supplies an external reference catalog for image characterization. May be None if the desired loader can be constructed from the butler argument or all steps requiring a catalog are disabled.
[in]astromRefObjLoaderAn instance of LoadReferenceObjectsTasks that supplies an external reference catalog for astrometric calibration. May be None if the desired loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled.
[in]photoRefObjLoaderAn instance of LoadReferenceObjectsTasks that supplies an external reference catalog for photometric calibration. May be None if the desired loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled.
[in,out]kwargsother keyword arguments for lsst.pipe.base.CmdLineTask

Definition at line 135 of file processCcd.py.

135  def __init__(self, butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None,
136  **kwargs):
137  """!
138  @param[in] butler The butler is passed to the refObjLoader constructor in case it is
139  needed. Ignored if the refObjLoader argument provides a loader directly.
140  @param[in] psfRefObjLoader An instance of LoadReferenceObjectsTasks that supplies an
141  external reference catalog for image characterization. May be None if the desired
142  loader can be constructed from the butler argument or all steps requiring a catalog
143  are disabled.
144  @param[in] astromRefObjLoader An instance of LoadReferenceObjectsTasks that supplies an
145  external reference catalog for astrometric calibration. May be None if the desired
146  loader can be constructed from the butler argument or all steps requiring a reference
147  catalog are disabled.
148  @param[in] photoRefObjLoader An instance of LoadReferenceObjectsTasks that supplies an
149  external reference catalog for photometric calibration. May be None if the desired
150  loader can be constructed from the butler argument or all steps requiring a reference
151  catalog are disabled.
152  @param[in,out] kwargs other keyword arguments for lsst.pipe.base.CmdLineTask
153  """
154  pipeBase.CmdLineTask.__init__(self, **kwargs)
155  self.makeSubtask("isr")
156  self.makeSubtask("charImage", butler=butler, refObjLoader=psfRefObjLoader)
157  self.makeSubtask("calibrate", butler=butler, icSourceSchema=self.charImage.schema,
158  astromRefObjLoader=astromRefObjLoader, photoRefObjLoader=photoRefObjLoader)
159 

Member Function Documentation

◆ runDataRef()

def lsst.pipe.tasks.processCcd.ProcessCcdTask.runDataRef (   self,
  sensorRef 
)
Process one CCD

The sequence of operations is:
- remove instrument signature
- characterize image to estimate PSF and background
- calibrate astrometry and photometry

@param sensorRef: butler data reference for raw data

@return pipe_base Struct containing these fields:
- charRes: object returned by image characterization task; an lsst.pipe.base.Struct
    that will include "background" and "sourceCat" fields
- calibRes: object returned by calibration task: an lsst.pipe.base.Struct
    that will include "background" and "sourceCat" fields
- exposure: final exposure (an lsst.afw.image.ExposureF)
- background: final background model (an lsst.afw.math.BackgroundList)

Definition at line 161 of file processCcd.py.

161  def runDataRef(self, sensorRef):
162  """Process one CCD
163 
164  The sequence of operations is:
165  - remove instrument signature
166  - characterize image to estimate PSF and background
167  - calibrate astrometry and photometry
168 
169  @param sensorRef: butler data reference for raw data
170 
171  @return pipe_base Struct containing these fields:
172  - charRes: object returned by image characterization task; an lsst.pipe.base.Struct
173  that will include "background" and "sourceCat" fields
174  - calibRes: object returned by calibration task: an lsst.pipe.base.Struct
175  that will include "background" and "sourceCat" fields
176  - exposure: final exposure (an lsst.afw.image.ExposureF)
177  - background: final background model (an lsst.afw.math.BackgroundList)
178  """
179  self.log.info("Processing %s" % (sensorRef.dataId))
180 
181  exposure = self.isr.runDataRef(sensorRef).exposure
182 
183  charRes = self.charImage.runDataRef(
184  dataRef=sensorRef,
185  exposure=exposure,
186  doUnpersist=False,
187  )
188  exposure = charRes.exposure
189 
190  if self.config.doCalibrate:
191  calibRes = self.calibrate.runDataRef(
192  dataRef=sensorRef,
193  exposure=charRes.exposure,
194  background=charRes.background,
195  doUnpersist=False,
196  icSourceCat=charRes.sourceCat,
197  )
198 
199  return pipeBase.Struct(
200  charRes=charRes,
201  calibRes=calibRes if self.config.doCalibrate else None,
202  exposure=exposure,
203  background=calibRes.background if self.config.doCalibrate else charRes.background,
204  )
205 

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.processCcd.ProcessCcdTask.ConfigClass
static

Definition at line 131 of file processCcd.py.

◆ RunnerClass

lsst.pipe.tasks.processCcd.ProcessCcdTask.RunnerClass
static

Definition at line 132 of file processCcd.py.


The documentation for this class was generated from the following file:
lsst::log.log.logContinued.info
def info(fmt, *args)
Definition: logContinued.py:198