LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Use astrometry.net to match input sources with a reference catalog and solve for the Wcs. More...
Public Member Functions | |
def | __init__ |
Create the astrometric calibration task. More... | |
def | run |
Load reference objects, match sources and optionally fit a WCS. More... | |
def | solve |
Match with reference sources and calculate an astrometric solution. More... | |
def | distort |
Calculate distorted source positions. More... | |
def | distortionContext |
Context manager that applies and removes distortion. More... | |
def | loadAndMatch |
Load reference objects overlapping an exposure and match to sources detected on that exposure. More... | |
def | refitWcs |
A final Wcs solution after matching and removing distortion. More... | |
Public Attributes | |
distortedName | |
centroidXKey | |
centroidYKey | |
centroidXErrKey | |
centroidYErrKey | |
centroidFlagKey | |
centroidKey | |
centroidErrKey | |
solver | |
Static Public Attributes | |
ConfigClass = ANetAstrometryConfig | |
Private Member Functions | |
def | _astrometry |
Solve astrometry to produce WCS. More... | |
Use astrometry.net to match input sources with a reference catalog and solve for the Wcs.
The actual matching and solving is done by the 'solver'; this Task serves as a wrapper for taking into account the known optical distortion.
Use astrometry.net to match input sources with a reference catalog and solve for the Wcs.
Create the astrometric calibration task. Most arguments are simply passed onto pipe.base.Task.
schema | An lsst::afw::table::Schema used to create the output lsst.afw.table.SourceCatalog |
**kwds | keyword arguments to be passed to the lsst.pipe.base.task.Task constructor |
A centroid field "centroid.distorted" (used internally during the Task's operation) will be added to the schema.
Load reference objects, match sources and optionally fit a WCS. This is a thin layer around solve or loadAndMatch, depending on config.forceKnownWcs
[in,out] | exposure | exposure whose WCS is to be fit The following are read only:
|
[in] | sourceCat | catalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog) |
The command line task interface supports a flag -d
to import debug.py from your PYTHONPATH
; see Using lsstDebug to control debugging output for more about debug.py files.
The available variables in ANetAstrometryTask are:
display
frame
pause
See meas_photocal_photocal_Example.
To investigate the Debug variables, put something like
into your debug.py file and run photoCalTask.py with the –debug
flag.
Definition at line 58 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.__init__ | ( | self, | |
schema, | |||
kwds | |||
) |
Create the astrometric calibration task.
Most arguments are simply passed onto pipe.base.Task.
schema | An lsst::afw::table::Schema used to create the output lsst.afw.table.SourceCatalog |
**kwds | keyword arguments to be passed to the lsst.pipe.base.task.Task constructor |
A centroid field "centroid.distorted" (used internally during the Task's operation) will be added to the schema.
Definition at line 129 of file anetAstrometry.py.
|
private |
Solve astrometry to produce WCS.
[in] | sourceCat | Sources on exposure, an lsst.afw.table.SourceCatalog |
[in,out] | exposure | Exposure to process, an lsst.afw.image.ExposureF or D; wcs is updated |
[in] | bbox | Bounding box, or None to use exposure |
Definition at line 354 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.distort | ( | self, | |
sourceCat, | |||
exposure | |||
) |
Calculate distorted source positions.
CCD images are often affected by optical distortion that makes the astrometric solution higher order than linear. Unfortunately, most (all?) matching algorithms require that the distortion be small or zero, and so it must be removed. We do this by calculating (un-)distorted positions, based on a known optical distortion model in the Ccd.
The distortion correction moves sources, so we return the distorted bounding box.
[in] | exposure | Exposure to process |
[in,out] | sourceCat | SourceCatalog; getX() and getY() will be used as inputs, with distorted points in "centroid.distorted" field. |
Definition at line 218 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.distortionContext | ( | self, | |
sourceCat, | |||
exposure | |||
) |
Context manager that applies and removes distortion.
We move the "centroid" definition in the catalog table to point to the distorted positions. This is undone on exit from the context.
The input Wcs is taken to refer to the coordinate system with the distortion correction applied, and hence no shift is required when the sources are distorted. However, after Wcs fitting, the Wcs is in the distorted frame so when the distortion correction is removed, the Wcs needs to be shifted to compensate.
sourceCat | Sources on exposure, an lsst.afw.table.SourceCatalog |
exposure | Exposure holding Wcs, an lsst.afw.image.ExposureF or D |
Definition at line 274 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.loadAndMatch | ( | self, | |
exposure, | |||
sourceCat, | |||
bbox = None |
|||
) |
Load reference objects overlapping an exposure and match to sources detected on that exposure.
[in] | exposure | exposure whose WCS is to be fit |
[in] | sourceCat | catalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog) |
[in] | bbox | bounding box go use for finding reference objects; if None, use exposure's bbox |
Definition at line 310 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.refitWcs | ( | self, | |
sourceCat, | |||
exposure, | |||
matches | |||
) |
A final Wcs solution after matching and removing distortion.
Specifically, fitting the non-linear part, since the linear part has been provided by the matching engine.
sourceCat | Sources on exposure, an lsst.afw.table.SourceCatalog |
exposure | Exposure of interest, an lsst.afw.image.ExposureF or D |
matches | Astrometric matches, as an lsst.afw.table.ReferenceMatchVector |
Definition at line 396 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.run | ( | self, | |
exposure, | |||
sourceCat | |||
) |
Load reference objects, match sources and optionally fit a WCS.
This is a thin layer around solve or loadAndMatch, depending on config.forceKnownWcs
[in,out] | exposure | exposure whose WCS is to be fit The following are read only:
|
[in] | sourceCat | catalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog) |
Definition at line 156 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.solve | ( | self, | |
exposure, | |||
sourceCat | |||
) |
Match with reference sources and calculate an astrometric solution.
[in,out] | exposure | Exposure to calibrate; wcs is updated |
[in] | sourceCat | catalog of measured sources (an lsst.afw.table.SourceCatalog) |
The reference catalog actually used is up to the implementation of the solver; it will be manifested in the returned matches as a list of lsst.afw.table.ReferenceMatch objects (i.e. of lsst.afw.table.Match with first
being of type lsst.afw.table.SimpleRecord and second
type lsst.afw.table.SourceRecord — the reference object and matched object respectively).
Definition at line 182 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidErrKey |
Definition at line 151 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidFlagKey |
Definition at line 148 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidKey |
Definition at line 150 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidXErrKey |
Definition at line 144 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidXKey |
Definition at line 140 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidYErrKey |
Definition at line 146 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidYKey |
Definition at line 142 of file anetAstrometry.py.
|
static |
Definition at line 127 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.distortedName |
Definition at line 139 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.solver |
Definition at line 153 of file anetAstrometry.py.