CalibrateImageTask¶
CalibrateImageTask
performs “single frame processing” on one (single visit) or two (two snap visit) post- Instrument Signature Removal single detector exposure (postISRCCD
).
This involves merging two snaps (if provided) into one visit exposure, repairing cosmic rays and defects, detecting and measuring sources on the exposure to make an initial estimation of the point spread function (PSF), re-doing detection and measurement with that fitted PSF to compute the astrometric and photometric calibrations, and computing summary statistics of the exposure and measured catalog.
Its primary outputs are a calibrated exposure (initial_pvi
, pixel values in nanojansky) and catalog (initial_stars_detector
) of bright (S/N >= 10) isolated point-like sources that were used as inputs to calibration and that are suitable for downstream use (for example as kernel candidates in difference imaging).
This task replaces the two older tasks CharacterizeImageTask
(roughly repair/estimate PSF/aperture correct) and CalibrateTask
(roughly detect/measure/astrometry/photometry).
Processing summary¶
CalibrateImageTask
runs this sequence of operations:
If two snap exposures are input,
combine
them into one visit exposure.Find stars to estimate the PSF, via two passes of repair/detect/measure/estimate PSF:
Install a simple Gaussian PSF in the exposure and subtract an initial estimate of the image background.
Perform cosmic ray
repair
, sourcedetection
to \(S/N >= 50\), and a minimal list ofmeasurement plugins
to compute a firstestimate of the PSF
.Install an updated Gaussian PSF representation of that first PSF estimate (to reduce noise and help with convergence) and re-run repair/detect/measure/estimate PSF as above.
Use that final fitted PSF to redo repair and measurement (hopefully with all cosmic rays now removed), resulting in the optional
initial_psf_stars_detector
andinitial_psf_stars_footprints_detector
output catalogs. Note that these catalogs do not have sky coordinates or calibrated fluxes.
Compute an
aperture correction
for the exposure using the final catalog measured after the PSF fit.Find stars to use as potential calibration sources:
Detect sources with a peak \(S/N >= 10\).
Find potential streaks
on the image from the detection Mask computed above, and Mask those streaks on the exposure.For the detected sources,
deblend
,measure
, aperture correct, and set flags based on blendedness, footprint size, and other properties.Select non-“bad” flagged, unresolved, \(S/N >= 10\), isolated sources to pass to the subsequent calibration steps and to be saved as the
initial_stars_detector
andinitial_stars_footprints_detector
output catalogs. Note that these catalogs do not have sky coordinates or calibrated fluxes: those are computed at a later step.
Match the list of stars from the two steps above, to propagate flags (e.g.
calib_psf_candidate
,calib_psf_used
) from the psf stars catalog into the second, primary output catalog.The steps above perform several rounds of background fitting, which together are saved as the
initial_pvi_background
output.Fit the
astrometry
to a reference catalog using anaffine WCS fitter
that requires a reasonable model of the camera geometry, to produce a SkyWcs for the exposure and compute on-sky coordinates for the catalog of stars. The star/refcat matches used in the astrometric fit is saved as the optionalinitial_astrometry_match_detector
catalog.Fit the
photometry
to a reference catalog, to produce a PhotoCalib for the exposure and calibrate both the image and catalog of stars to have pixels and fluxes respectively in nanojansky. Note that this results in the output exposure having a PhotoCalib identically 1; the applied PhotoCalib is saved as theinitial_photoCalib_detector
output. The star/refcat matches used in the photometric fit is saved as the optionalinitial_photometry_match_detector
catalog.Finally, the measurements and fits performed above are combined into a variety of summary statistics which are attached to the exposure, which is saved as the
initial_pvi
output.
Python API summary¶
from lsst.pipe.tasks.calibrateImage import CalibrateImageTask
-
class
CalibrateImageTask
(initial_stars_schema=None, **kwargs) Compute the PSF, aperture corrections, astrometric and photometric calibrations, and summary statistics for a single science exposure, and produce a catalog of brighter stars that were used to calibrate it
...
- attributeconfig
Access configuration fields and retargetable subtasks.
-
method
run
(*, exposures, id_generator=None) Find stars and perform psf measurement, then do a deeper detection and measurement and calibrate astrometry and photometry from that
...
See also
See the CalibrateImageTask
API reference for complete details.
Retargetable subtasks¶
astrometry¶
- Default
lsst.meas.astrom.astrometry.AstrometryTask
- Field type
Task to perform astrometric calibration to fit a WCS.
compute_summary_stats¶
Task to to compute summary statistics on the calibrated exposure.
install_simple_psf¶
Task to install a simple PSF model into the input exposure to use when detecting bright sources for PSF estimation.
measure_aperture_correction¶
- Default
- Field type
Task to compute the aperture correction from the bright stars.
photometry¶
- Default
- Field type
Task to perform photometric calibration to fit a PhotoCalib.
psf_detection¶
- Default
- Field type
Task to detect sources for PSF determination.
psf_measure_psf¶
- Default
- Field type
Task to measure the psf on bright sources.
psf_repair¶
- Default
- Field type
Task to repair cosmic rays on the exposure before PSF determination.
psf_source_measurement¶
- Default
- Field type
Task to measure sources to be used for psf estimation.
psf_subtract_background¶
Task to perform intial background subtraction, before first detection pass.
snap_combine¶
- Default
- Field type
Task to combine two snaps to make one exposure.
star_apply_aperture_correction¶
- Default
- Field type
Task to apply aperture corrections to the selected stars.
star_catalog_calculation¶
Task to compute extendedness values on the star catalog, for the star selector to remove extended sources.
star_deblend¶
- Default
lsst.meas.deblender.sourceDeblendTask.SourceDeblendTask
- Field type
Split blended sources into their components.
star_detection¶
- Default
- Field type
Task to detect stars to return in the output catalog.
star_measurement¶
- Default
- Field type
Task to measure stars to return in the output catalog.
star_selector¶
- Default
'science'
- Field type
Single-selection
RegistryField
- Choices
'science'
lsst.meas.algorithms.sourceSelector.ScienceSourceSelectorTask
'references'
lsst.meas.algorithms.sourceSelector.ReferenceSourceSelectorTask
'null'
lsst.meas.algorithms.sourceSelector.NullSourceSelectorTask
'objectSize'
lsst.meas.algorithms.objectSizeStarSelector.ObjectSizeStarSelectorTask
'flagged'
lsst.meas.algorithms.flaggedSourceSelector.FlaggedSourceSelectorTask
'astrometry'
lsst.meas.algorithms.astrometrySourceSelector.AstrometrySourceSelectorTask
'matcher'
lsst.meas.algorithms.matcherSourceSelector.MatcherSourceSelectorTask
Task to select isolated stars to use for calibration.
star_set_primary_flags¶
- Default
lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask
- Field type
Task to add isPrimary to the catalog.
star_sky_sources¶
- Default
- Field type
Task to generate sky sources (‘empty’ regions where there are no detections).
Configuration fields¶
astrometry_ref_loader¶
- Data type
lsst.meas.algorithms.loadReferenceObjects.LoadReferenceObjectsConfig
- Field type
Configuration of reference object loader for astrometric fit.
connections¶
- Data type
lsst.pipe.base.config.CalibrateImageConfigConnections
- Field type
Configurations describing the connections of the PipelineTask to datatypes
id_generator¶
- Data type
lsst.meas.base._id_generator.DetectorVisitIdGeneratorConfig
- Field type
Configuration for how to generate catalog IDs from data IDs.
optional_outputs¶
- Default
['psf_stars', 'psf_stars_footprints', 'astrometry_matches', 'photometry_matches']
- Field type
Which optional outputs to save (as their connection name)?
photometry_ref_loader¶
- Data type
lsst.meas.algorithms.loadReferenceObjects.LoadReferenceObjectsConfig
- Field type
Configuration of reference object loader for photometric fit.
saveLogOutput¶
Flag to enable/disable saving of log output for a task, enabled by default.