lsst.meas.astrom  14.0-7-g0d69b06+3
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.astrom.astrometry.AstrometryTask Class Reference

Match an input source catalog with objects from a reference catalog and solve for the WCS. More...

Inheritance diagram for lsst.meas.astrom.astrometry.AstrometryTask:
lsst.meas.astrom.ref_match.RefMatchTask

Public Member Functions

def __init__ (self, refObjLoader, schema=None, kwargs)
 Construct an AstrometryTask. More...
 
def run (self, sourceCat, exposure)
 Load reference objects, match sources and optionally fit a WCS. More...
 
def solve (self, exposure, sourceCat)
 Load reference objects overlapping an exposure, match to sources and fit a WCS. More...
 
def loadAndMatch (self, exposure, sourceCat)
 Load reference objects overlapping an exposure and match to sources detected on that exposure. More...
 

Public Attributes

 usedKey
 
 refObjLoader
 

Static Public Attributes

 ConfigClass = AstrometryConfig
 

Detailed Description

Match an input source catalog with objects from a reference catalog and solve for the WCS.

Contents

Description

Match input sourceCat with a reference catalog and solve for the Wcs

There are three steps, each performed by different subtasks:

Task initialisation

Construct an AstrometryTask.

Parameters
[in]refObjLoaderA reference object loader object
[in]schemaignored; available for compatibility with an older astrometry task
[in]kwargsadditional keyword arguments for pipe_base Task.__init__

Invoking the Task

Load reference objects, match sources and optionally fit a WCS. This is a thin layer around solve or loadAndMatch, depending on config.forceKnownWcs

Parameters
[in,out]exposureexposure whose WCS is to be fit The following are read only:
  • bbox
  • calib (may be absent)
  • filter (may be unset)
  • detector (if wcs is pure tangent; may be absent) The following are updated:
  • wcs (the initial value is used as an initial guess, and is required)
[in]sourceCatcatalog of sources detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:

Load reference objects overlapping an exposure and match to sources detected on that exposure.

Parameters
[in]exposureexposure that the sources overlap
[in]sourceCatcatalog of sources detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:
Note
ignores config.matchDistanceSigma

Configuration parameters

See AstrometryConfig

A complete example of using AstrometryTask

See pipe_tasks_photocal_Example.

Debug variables

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 AstrometryTask are:

display (bool)
If True display information at three stages: after finding reference objects, after matching sources to reference objects, and after fitting the WCS; defaults to False
frame (int)
ds9 frame to use to display the reference objects; the next two frames are used to display the match list and the results of the final WCS; defaults to 0

To investigate the Debug variables, put something like

import lsstDebug
def DebugInfo(name):
debug = lsstDebug.getInfo(name) # N.b. lsstDebug.Info(name) would call us recursively
if name == "lsst.meas.astrom.astrometry":
debug.display = True
return debug
lsstDebug.Info = DebugInfo

into your debug.py file and run this task with the –debug flag.

Definition at line 70 of file astrometry.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.astrom.astrometry.AstrometryTask.__init__ (   self,
  refObjLoader,
  schema = None,
  kwargs 
)

Construct an AstrometryTask.

Parameters
[in]refObjLoaderA reference object loader object
[in]schemaignored; available for compatibility with an older astrometry task
[in]kwargsadditional keyword arguments for pipe_base Task.__init__

Definition at line 144 of file astrometry.py.

Member Function Documentation

◆ loadAndMatch()

def lsst.meas.astrom.ref_match.RefMatchTask.loadAndMatch (   self,
  exposure,
  sourceCat 
)
inherited

Load reference objects overlapping an exposure and match to sources detected on that exposure.

Parameters
[in]exposureexposure that the sources overlap
[in]sourceCatcatalog of sources detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:
Note
ignores config.matchDistanceSigma

Definition at line 85 of file ref_match.py.

◆ run()

def lsst.meas.astrom.astrometry.AstrometryTask.run (   self,
  sourceCat,
  exposure 
)

Load reference objects, match sources and optionally fit a WCS.

This is a thin layer around solve or loadAndMatch, depending on config.forceKnownWcs

Parameters
[in,out]exposureexposure whose WCS is to be fit The following are read only:
  • bbox
  • calib (may be absent)
  • filter (may be unset)
  • detector (if wcs is pure tangent; may be absent) The following are updated:
  • wcs (the initial value is used as an initial guess, and is required)
[in]sourceCatcatalog of sources detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:

Definition at line 162 of file astrometry.py.

◆ solve()

def lsst.meas.astrom.astrometry.AstrometryTask.solve (   self,
  exposure,
  sourceCat 
)

Load reference objects overlapping an exposure, match to sources and fit a WCS.

Returns
an lsst.pipe.base.Struct with these fields:
Note
ignores config.forceKnownWcs

Definition at line 192 of file astrometry.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.astrom.astrometry.AstrometryTask.ConfigClass = AstrometryConfig
static

Definition at line 141 of file astrometry.py.

◆ refObjLoader

lsst.meas.astrom.ref_match.RefMatchTask.refObjLoader
inherited

Definition at line 79 of file ref_match.py.

◆ usedKey

lsst.meas.astrom.astrometry.AstrometryTask.usedKey

Definition at line 154 of file astrometry.py.


The documentation for this class was generated from the following file: