ProcessCcdTask¶
ProcessCcdTask provides a preliminary astrometric and photometric calibration for a single frame (a raw dataset), yielding a calexp dataset.
ProcessCcdTask is available as a command-line task, processCcd.py.
Processing summary¶
ProcessCcdTask runs this sequence of operations:
Removes instrumental signature from the
rawdataset by calling theisrsubtask (default:IsrTask).This is the ISR step. In the LSST Science Pipelines, individual cameras tune the configurations for the
isrsubtask. By running this task, you automatically leverage expertise from the camera’s builders and community.Characterizes the post-ISR exposure by calling the
charImagesubtask (default:CharacterizeImageTask):- Models the background.
- Models the PSF.
- Repairs cosmic ray hits.
- Detects and measures bright sources.
- Measures an aperture correction.
Calibrates the post-characterization exposure by calling the
calibratesubtask (default:CalibrateTask):- Detects sources more completely (using PSF and aperture corrections from the previous step).
- Fits an improved WCS.
- Fits a photometric zeropoint.
Note: you can disable the calibration step with the
doCalibrateconfiguration field.
processCcd.py command-line interface¶
processCcd.py REPOPATH [@file [@file2 ...]] [--output OUTPUTREPO | --rerun RERUN] [--id] [other named arguments]
Key arguments:
-
REPOPATH¶ The input Butler repository’s URI or file path.
Key options:
-
--id¶ The data IDs to process.
See also
See Command-line task argument reference for details and additional options.
Python API summary¶
from lsst.pipe.tasks.processCcd import ProcessCcdTask
-
class
(butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None, **kwargs)ProcessCcdTask !Assemble raw data, fit the PSF, detect and measure, and fit WCS and zero-point
...
-
attribute
config Access configuration fields and retargetable subtasks.
-
method
(sensorRef)runDataRef Process one CCD
...
See also
See the ProcessCcdTask API reference for complete details.
Butler datasets¶
When run as the processCcd.py command-line task, or directly through the runDataRef method, ProcessCcdTask obtains datasets from the input Butler data repository and persists outputs to the output Butler data repository.
Note that configurations for ProcessCcdTask and its subtasks affect what datasets are persisted, and what their content is.
Input datasets¶
raw- Raw dataset from a camera, as ingested into the input Butler data repository.
Unpersisted by the
isrsubtask.
Output datasets¶
calexpThe calibrated exposure. Persisted by the
calibratesubtask.The default subtask (
CalibrateTask) adds the following metadata:MAGZERO_RMS- The RMS (standard deviation) of
MAGZERO, measured by thephotoCalsubtask. MAGZERO_NOBJ:Number of stars used to estimate ``MAGZERO.- This is
ngoodreported by thephotoCalsubtask. COLORTERM1- Always
0.0. COLORTERM2- Always
0.0. COLORTERM3- Always
0.0.
calexpBackground- Background model for the
calexpcalibrated exposure. Persisted by thecalibratesubtask. icExp- The characterized exposure.
Persisted by the
charImagesubtask. icExpBackground- Background model of the
icExpexposure. icSrc- The source catalog of the characterized exposure,
icExp. Persisted by thecharImagesubtask. postISRCCD- Post-ISR exposure.
Persisted by the
charImagesubtask. src- Table of sources measured in the calibrated exposure.
Persisted by the
calibratesubtask. srcMatch- Table of matches between the sources and reference objects, created by the astrometry solver.
Persisted by the
calibratesubtask. srcMatchFull- Denormalized version of
srcMatch. Persisted by thecalibratesubtask.
Retargetable subtasks¶
calibrate¶
- Default
lsst.pipe.tasks.calibrate.CalibrateTask- Field type
ConfigurableField
- Task to perform astrometric and photometric calibration:
- refine the WCS in the exposure
- refine the PhotoCalib object in the exposure
- detect sources, usually at low S/N
charImage¶
- Default
lsst.pipe.tasks.characterizeImage.CharacterizeImageTask- Field type
ConfigurableField
- Task to characterize a science exposure:
- detect sources, usually at high S/N
- estimate the background, which is subtracted from the image and returned as field “background”
- estimate a PSF model, which is added to the exposure
- interpolate over defects and cosmic rays, updating the image, variance and mask planes
isr¶
- Default
lsst.ip.isr.isrTask.IsrTask- Field type
ConfigurableField
- Task to perform instrumental signature removal or load a post-ISR image; ISR consists of:
- assemble raw amplifier images into an exposure with image, variance and mask planes
- perform bias subtraction, flat fielding, etc.
- mask known bad pixels
- provide a preliminary WCS
Examples¶
Simple command-line usage¶
ProcessCcdTask is used as a command-line task that processes raw datasets into a Butler repository.
As an example, you can use raw datasets in the obs_test package.
First, set up the relevant packages on the command line:
setup lsst_distrib
setup -k obs_test
Then run the processCcd.py task:
processCcd.py $OBS_TEST_DIR/data/input --output processCcdOut --id
Using the --id option without any data ID keys finds all available raw data in the Butler dataset for processing.
The output calexp and src datasets are written to the processCcdOut directory.
Important
If processCcdOut already exists, you’ll need to either delete the existing directory or give the --output option a different directory name.
Debugging¶
ProcessCcdTask does not have debug output, though its subtasks may.