LSSTApplications
11.0-22-g33de520,12.1+25,13.0+25,13.0+30,13.0-1-g174df6e+3,13.0-1-g41367f3+3,13.0-1-g47a359c+3,13.0-1-g52a7baa+3,13.0-1-g976b40b+3,13.0-10-gcc6134a+6,13.0-10-gf7c21d5+2,13.0-13-gdd29b46+5,13.0-14-gc9904b0,13.0-2-g15de9a1+3,13.0-2-ga4f5e85+6,13.0-2-gf5c5ced+6,13.0-2-gf9e84ea+5,13.0-22-g8f1d162,13.0-3-g7fa07e0+4,13.0-34-ga37f01a,13.0-4-g0bde1de,13.0-5-g0db1a30+1,13.0-5-g6708b9e+9,13.0-6-g7b63e3f+6,13.0-8-gba0f85f,13.0-9-gc47bba1,master-gb637561bb9
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 |
refObjLoader | The AstrometryTask constructor requires a refObjLoader. In order to make this task retargettable for AstrometryTask it needs to take the same arguments. This argument will be ignored since it uses its own internal loader. |
**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 70 of file anetAstrometry.py.
def lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.__init__ | ( | self, | |
schema, | |||
refObjLoader = None , |
|||
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 |
refObjLoader | The AstrometryTask constructor requires a refObjLoader. In order to make this task retargettable for AstrometryTask it needs to take the same arguments. This argument will be ignored since it uses its own internal loader. |
**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 142 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 372 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 234 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 289 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 325 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 a list of lsst.afw.table.ReferenceMatch |
Definition at line 417 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 172 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 198 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidErrKey |
Definition at line 167 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidFlagKey |
Definition at line 164 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidKey |
Definition at line 166 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidXErrKey |
Definition at line 160 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidXKey |
Definition at line 156 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidYErrKey |
Definition at line 162 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.centroidYKey |
Definition at line 158 of file anetAstrometry.py.
|
static |
Definition at line 140 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.distortedName |
Definition at line 155 of file anetAstrometry.py.
lsst.meas.astrom.anetAstrometry.ANetAstrometryTask.solver |
Definition at line 169 of file anetAstrometry.py.