|
| | _apply_illumination_correction (self, exposure, background_flat, illumination_correction) |
| |
| | _compute_psf (self, result, id_generator) |
| |
| | _measure_aperture_correction (self, exposure, bright_sources) |
| |
| | _find_stars (self, exposure, background, id_generator, background_to_photometric_ratio=None, adaptive_det_res_struct=None, num_astrometry_matches=None) |
| |
| | _match_psf_stars (self, psf_stars, stars, psfSigma=None) |
| |
| | _fit_astrometry (self, exposure, stars, exposure_region=None) |
| |
| | _fit_photometry (self, exposure, stars) |
| |
| | _apply_photometry (self, exposure, background, background_to_photometric_ratio=None) |
| |
| | _summarize (self, exposure, stars, background) |
| |
| | _recordMaskedPixelFractions (self, exposure) |
| |
| | _update_wcs_with_camera_model (self, exposure, cameraModel, exposure_record=None) |
| |
| | _update_wcs_to_exposure_record (self, exposure, exposure_record) |
| |
| | _compute_mask_fraction (self, mask, mask_planes, bad_mask_planes) |
| |
| | _compute_per_amp_fraction (self, exposure, detected_fraction, mask_planes, bad_mask_planes) |
| |
| | _remeasure_star_background (self, result, background_to_photometric_ratio=None) |
| |
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.
Parameters
----------
initial_stars_schema : `lsst.afw.table.Schema`
Schema of the initial_stars output catalog.
Definition at line 723 of file calibrateImage.py.
| lsst.pipe.tasks.calibrateImage.CalibrateImageTask._compute_psf |
( |
| self, |
|
|
| result, |
|
|
| id_generator ) |
|
protected |
Find bright sources detected on an exposure and fit a PSF model to
them, repairing likely cosmic rays before detection.
Repair, detect, measure, and compute PSF twice, to ensure the PSF
model does not include contributions from cosmic rays.
Parameters
----------
result : `lsst.pipe.base.Struct`
Result struct that is modified to allow saving of partial outputs
for some failure conditions. Should contain at least the following
attributes:
- exposure : `lsst.afw.image.Exposure`
Exposure to detect and measure bright stars on.
- background : `lsst.afw.math.BackgroundList` | `None`
Background that was fit to the exposure during detection.
- background_to_photometric_ratio : `lsst.afw.image.Image` | `None`
Image to convert photometric-flattened image to
background-flattened image.
id_generator : `lsst.meas.base.IdGenerator`
Object that generates source IDs and provides random seeds.
Returns
-------
sources : `lsst.afw.table.SourceCatalog`
Catalog of detected bright sources.
cell_set : `lsst.afw.math.SpatialCellSet`
PSF candidates returned by the psf determiner.
adaptive_det_res_struct : `lsst.pipe.base.Struct`
Result struct from the adaptive threshold detection.
Notes
-----
This method modifies the exposure, background and
background_to_photometric_ratio attributes of the result struct
in-place.
Definition at line 1240 of file calibrateImage.py.
| lsst.pipe.tasks.calibrateImage.CalibrateImageTask._find_stars |
( |
| self, |
|
|
| exposure, |
|
|
| background, |
|
|
| id_generator, |
|
|
| background_to_photometric_ratio = None, |
|
|
| adaptive_det_res_struct = None, |
|
|
| num_astrometry_matches = None ) |
|
protected |
Detect stars on an exposure that has a PSF model, and measure their
PSF, circular aperture, compensated gaussian fluxes.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to detect and measure stars on.
background : `lsst.afw.math.BackgroundList`
Background that was fit to the exposure during detection;
modified in-place during subsequent detection.
id_generator : `lsst.meas.base.IdGenerator`
Object that generates source IDs and provides random seeds.
background_to_photometric_ratio : `lsst.afw.image.Image`, optional
Image to convert photometric-flattened image to
background-flattened image.
Returns
-------
stars : `SourceCatalog`
Sources that are very likely to be stars, with a limited set of
measurements performed on them.
Definition at line 1418 of file calibrateImage.py.
| lsst.pipe.tasks.calibrateImage.CalibrateImageTask._fit_astrometry |
( |
| self, |
|
|
| exposure, |
|
|
| stars, |
|
|
| exposure_region = None ) |
|
protected |
Fit an astrometric model to the data and return the reference
matches used in the fit, and the fitted WCS.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure that is being fit, to get PSF and other metadata from.
Modified to add the fitted skyWcs.
stars : `SourceCatalog`
Good stars selected for use in calibration, with RA/Dec coordinates
computed from the pixel positions and fitted WCS.
exposure_region : `lsst.sphgeom.Region`, optional
The exposure region to use for the reference catalog filtering.
If `None`, this region will be set as a padded bbox + current WCS
of the exposure.
Returns
-------
matches : `list` [`lsst.afw.table.ReferenceMatch`]
Reference/stars matches used in the fit.
Definition at line 1633 of file calibrateImage.py.
| lsst.pipe.tasks.calibrateImage.CalibrateImageTask._fit_photometry |
( |
| self, |
|
|
| exposure, |
|
|
| stars ) |
|
protected |
Fit a photometric model to the data and return the reference
matches used in the fit, and the fitted PhotoCalib.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure that is being fit, to get PSF and other metadata from.
Has the fit `lsst.afw.image.PhotoCalib` attached, with pixel values
unchanged.
stars : `lsst.afw.table.SourceCatalog`
Good stars selected for use in calibration.
background : `lsst.afw.math.BackgroundList`
Background that was fit to the exposure during detection of the
above stars.
Returns
-------
calibrated_stars : `lsst.afw.table.SourceCatalog`
Star catalog with flux/magnitude columns computed from the fitted
photoCalib (instFlux columns are retained as well).
matches : `list` [`lsst.afw.table.ReferenceMatch`]
Reference/stars matches used in the fit.
matchMeta : `lsst.daf.base.PropertyList`
Metadata needed to unpersist matches, as returned by the matcher.
photo_calib : `lsst.afw.image.PhotoCalib`
Photometric calibration that was fit to the star catalog.
Definition at line 1681 of file calibrateImage.py.
| lsst.pipe.tasks.calibrateImage.CalibrateImageTask.run |
( |
| self, |
|
|
* | , |
|
|
| exposures, |
|
|
| id_generator = None, |
|
|
| result = None, |
|
|
| background_flat = None, |
|
|
| illumination_correction = None, |
|
|
| camera_model = None, |
|
|
| exposure_record = None, |
|
|
| exposure_region = None ) |
Find stars and perform psf measurement, then do a deeper detection
and measurement and calibrate astrometry and photometry from that.
Parameters
----------
exposures : `lsst.afw.image.Exposure` or \
`list` [`lsst.afw.image.Exposure`]
Post-ISR exposure(s), with an initial WCS, VisitInfo, and Filter.
Modified in-place during processing if only one is passed.
If two exposures are passed, treat them as snaps and combine
before doing further processing.
id_generator : `lsst.meas.base.IdGenerator`, optional
Object that generates source IDs and provides random seeds.
result : `lsst.pipe.base.Struct`, optional
Result struct that is modified to allow saving of partial outputs
for some failure conditions. If the task completes successfully,
this is also returned.
background_flat : `lsst.afw.image.Exposure`, optional
Background flat-field image.
illumination_correction : `lsst.afw.image.Exposure`, optional
Illumination correction image.
camera_model : `lsst.afw.cameraGeom.Camera`, optional
Camera to be used if constructing updated WCS.
exposure_record : `lsst.daf.butler.DimensionRecord`, optional
Butler metadata for the ``exposure`` dimension. Used if
constructing an updated WCS instead of the boresight and
orientation angle from the visit info.
exposure_region : `lsst.sphgeom.Region`, optional
The exposure region to use for the reference catalog filtering.
If `None`, this region will be set as a padded bbox + current WCS
of the exposure.
Returns
-------
result : `lsst.pipe.base.Struct`
Results as a struct with attributes:
``exposure``
Calibrated exposure, with pixels in nJy units.
(`lsst.afw.image.Exposure`)
``stars``
Stars that were used to calibrate the exposure, with
calibrated fluxes and magnitudes.
(`astropy.table.Table`)
``stars_footprints``
Footprints of stars that were used to calibrate the exposure.
(`lsst.afw.table.SourceCatalog`)
``psf_stars``
Stars that were used to determine the image PSF.
(`astropy.table.Table`)
``psf_stars_footprints``
Footprints of stars that were used to determine the image PSF.
(`lsst.afw.table.SourceCatalog`)
``background``
Background that was fit to the exposure when detecting
``stars``. (`lsst.afw.math.BackgroundList`)
``applied_photo_calib``
Photometric calibration that was fit to the star catalog and
applied to the exposure. (`lsst.afw.image.PhotoCalib`)
This is `None` if ``config.do_calibrate_pixels`` is `False`.
``astrometry_matches``
Reference catalog stars matches used in the astrometric fit.
(`list` [`lsst.afw.table.ReferenceMatch`] or
`lsst.afw.table.BaseCatalog`).
``photometry_matches``
Reference catalog stars matches used in the photometric fit.
(`list` [`lsst.afw.table.ReferenceMatch`] or
`lsst.afw.table.BaseCatalog`).
``mask``
Copy of the mask plane of `exposure`.
(`lsst.afw.image.Mask`)
Definition at line 897 of file calibrateImage.py.