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
Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Static Private 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:

Public Member Functions

def __init__
 Construct an AstrometryTask. More...
 
def run
 Load reference objects, match sources and optionally fit a WCS. More...
 
def loadAndMatch
 Load reference objects overlapping an exposure and match to sources detected on that exposure. More...
 
def solve
 Load reference objects overlapping an exposure, match to sources and fit a WCS. More...
 

Static Public Attributes

 ConfigClass = AstrometryConfig
 

Private Member Functions

def _computeMatchStatsOnSky
 
def _getExposureMetadata
 Extract metadata from an exposure. More...
 
def _matchAndFitWcs
 Match sources to reference objects and fit a WCS. More...
 

Static Private Member Functions

def _createMatchMetadata
 

Static Private Attributes

string _DefaultName = "astrometricSolver"
 

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]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 sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:
  • refCat reference object catalog of objects that overlap the exposure (with some margin) (an lsst::afw::table::SimpleCatalog)
  • matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
  • scatterOnSky median on-sky separation between reference objects and sources in "matches" (an lsst.afw.geom.Angle), or None if config.forceKnownWcs True
  • matchMeta metadata about the field (an lsst.daf.base.PropertyList)

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

Parameters
[in]exposureexposure whose WCS is to be fit
[in]sourceCatcatalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:
  • refCat reference object catalog of objects that overlap the exposure (with some margin) (an lsst::afw::table::SimpleCatalog)
  • matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
  • matchMeta metadata about the field (an lsst.daf.base.PropertyList)
Note
ignores config.forceKnownWcs, config.maxIter, config.matchDistanceSigma and config.minMatchDistanceArcSec

Configuration parameters

See AstrometryConfig

A complete example of using AstrometryTask

See meas_photocal_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

1 import lsstDebug
2 def DebugInfo(name):
3  debug = lsstDebug.getInfo(name) # N.b. lsstDebug.Info(name) would call us recursively
4  if name == "lsst.meas.astrom.astrometry":
5  debug.display = True
6 
7  return debug
8 
9 lsstDebug.Info = DebugInfo

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

Definition at line 65 of file astrometry.py.

Constructor & Destructor Documentation

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

Construct an AstrometryTask.

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

Definition at line 139 of file astrometry.py.

140  def __init__(self, schema=None, **kwargs):
141  """!Construct an AstrometryTask
142 
143  @param[in] schema ignored; available for compatibility with an older astrometry task
144  @param[in] kwargs additional keyword arguments for pipe_base Task.\_\_init\_\_
145  """
146  pipeBase.Task.__init__(self, **kwargs)
147  self.makeSubtask("refObjLoader")
148  self.makeSubtask("matcher")
149  self.makeSubtask("wcsFitter")
def __init__
Construct an AstrometryTask.
Definition: astrometry.py:139

Member Function Documentation

def lsst.meas.astrom.astrometry.AstrometryTask._computeMatchStatsOnSky (   self,
  matchList 
)
private
Compute on-sky radial distance statistics for a match list

@param[in] matchList  list of matches between reference object and sources;
    the distance field is the only field read and it must be set to distance in radians

@return a pipe_base Struct containing these fields:
- distMean  clipped mean of on-sky radial separation
- distStdDev  clipped standard deviation of on-sky radial separation
- maxMatchDist  distMean + self.config.matchDistanceSigma*distStdDev

Definition at line 338 of file astrometry.py.

339  def _computeMatchStatsOnSky(self, matchList):
340  """Compute on-sky radial distance statistics for a match list
341 
342  @param[in] matchList list of matches between reference object and sources;
343  the distance field is the only field read and it must be set to distance in radians
344 
345  @return a pipe_base Struct containing these fields:
346  - distMean clipped mean of on-sky radial separation
347  - distStdDev clipped standard deviation of on-sky radial separation
348  - maxMatchDist distMean + self.config.matchDistanceSigma*distStdDev
349  """
350  distStatsInRadians = makeMatchStatistics(matchList, afwMath.MEANCLIP | afwMath.STDEVCLIP)
351  distMean = distStatsInRadians.getValue(afwMath.MEANCLIP)*afwGeom.radians
352  distStdDev = distStatsInRadians.getValue(afwMath.STDEVCLIP)*afwGeom.radians
353  return pipeBase.Struct(
354  distMean = distMean,
355  distStdDev = distStdDev,
356  maxMatchDist = distMean + self.config.matchDistanceSigma*distStdDev,
)
afw::math::Statistics makeMatchStatistics(std::vector< MatchT > const &matchList, int const flags, afw::math::StatisticsControl const &sctrl=afw::math::StatisticsControl())
def lsst.meas.astrom.astrometry.AstrometryTask._createMatchMetadata (   bbox,
  wcs,
  filterName 
)
staticprivate
Create matchMeta metadata required for regenerating the catalog

This is copied from Astrom and I'm not sure why it is needed.

@param bbox  bounding box of exposure (an lsst.afw.geom.Box2I or Box2D)
@param wcs  WCS of exposure
@param filterName Name of filter, used for magnitudes
@return metadata about the field (a daf_base PropertyList)

Definition at line 448 of file astrometry.py.

449  def _createMatchMetadata(bbox, wcs, filterName):
450  """Create matchMeta metadata required for regenerating the catalog
451 
452  This is copied from Astrom and I'm not sure why it is needed.
453 
454  @param bbox bounding box of exposure (an lsst.afw.geom.Box2I or Box2D)
455  @param wcs WCS of exposure
456  @param filterName Name of filter, used for magnitudes
457  @return metadata about the field (a daf_base PropertyList)
458  """
459  matchMeta = PropertyList()
460  bboxd = afwGeom.Box2D(bbox)
461  ctrPos = bboxd.getCenter()
462  ctrCoord = wcs.pixelToSky(ctrPos).toIcrs()
463  llCoord = wcs.pixelToSky(bboxd.getMin())
464  approxRadius = ctrCoord.angularSeparation(llCoord)
465  matchMeta.add('RA', ctrCoord.getRa().asDegrees(), 'field center in degrees')
466  matchMeta.add('DEC', ctrCoord.getDec().asDegrees(), 'field center in degrees')
467  matchMeta.add('RADIUS', approxRadius.asDegrees(), 'field radius in degrees, approximate')
468  matchMeta.add('SMATCHV', 1, 'SourceMatchVector version number')
469  if filterName is not None:
470  matchMeta.add('FILTER', filterName, 'filter name for tagalong data')
471  return matchMeta
Class for storing ordered metadata with comments.
Definition: PropertyList.h:81
A floating-point coordinate rectangle geometry.
Definition: Box.h:271
def lsst.meas.astrom.astrometry.AstrometryTask._getExposureMetadata (   self,
  exposure 
)
private

Extract metadata from an exposure.

Returns
an lsst.pipe.base.Struct containing the following exposure metadata:
  • bbox: parent bounding box
  • wcs: WCS (an lsst.afw.image.Wcs)
  • calib calibration (an lsst.afw.image.Calib), or None if unknown
  • filterName: name of filter, or None if unknown

Definition at line 357 of file astrometry.py.

358  def _getExposureMetadata(self, exposure):
359  """!Extract metadata from an exposure
360 
361  @return an lsst.pipe.base.Struct containing the following exposure metadata:
362  - bbox: parent bounding box
363  - wcs: WCS (an lsst.afw.image.Wcs)
364  - calib calibration (an lsst.afw.image.Calib), or None if unknown
365  - filterName: name of filter, or None if unknown
366  """
367  exposureInfo = exposure.getInfo()
368  filterName = exposureInfo.getFilter().getName() or None
369  if filterName == "_unknown_":
370  filterName = None
371  return pipeBase.Struct(
372  bbox = exposure.getBBox(),
373  wcs = getDistortedWcs(exposureInfo, log=self.log),
374  calib = exposureInfo.getCalib() if exposureInfo.hasCalib() else None,
375  filterName = filterName,
376  )
def _getExposureMetadata
Extract metadata from an exposure.
Definition: astrometry.py:357
def getDistortedWcs
Get a WCS from an exposureInfo, with distortion terms if possible.
Definition: utils.py:46
def lsst.meas.astrom.astrometry.AstrometryTask._matchAndFitWcs (   self,
  refCat,
  sourceCat,
  refFluxField,
  bbox,
  wcs,
  maxMatchDist = None,
  exposure = None 
)
private

Match sources to reference objects and fit a WCS.

Parameters
[in]refCatcatalog of reference objects
[in]sourceCatcatalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
[in]refFluxFieldfield of refCat to use for flux
[in]bboxbounding box of exposure (an lsst.afw.geom.Box2I)
[in]wcsinitial guess for WCS of exposure (an lsst.afw.image.Wcs)
[in]maxMatchDistmaximum on-sky distance between reference objects and sources (an lsst.afw.geom.Angle); if None then use the matcher's default
[in]exposureexposure whose WCS is to be fit, or None; used only for the debug display
Returns
an lsst.pipe.base.Struct with these fields:
  • matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
  • wcs the fit WCS (an lsst.afw.image.Wcs)
  • scatterOnSky median on-sky separation between reference objects and sources in "matches" (an lsst.afw.geom.Angle)

Definition at line 379 of file astrometry.py.

380  exposure=None):
381  """!Match sources to reference objects and fit a WCS
382 
383  @param[in] refCat catalog of reference objects
384  @param[in] sourceCat catalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
385  @param[in] refFluxField field of refCat to use for flux
386  @param[in] bbox bounding box of exposure (an lsst.afw.geom.Box2I)
387  @param[in] wcs initial guess for WCS of exposure (an lsst.afw.image.Wcs)
388  @param[in] maxMatchDist maximum on-sky distance between reference objects and sources
389  (an lsst.afw.geom.Angle); if None then use the matcher's default
390  @param[in] exposure exposure whose WCS is to be fit, or None; used only for the debug display
391 
392  @return an lsst.pipe.base.Struct with these fields:
393  - matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
394  - wcs the fit WCS (an lsst.afw.image.Wcs)
395  - scatterOnSky median on-sky separation between reference objects and sources in "matches"
396  (an lsst.afw.geom.Angle)
397  """
398  import lsstDebug
399  debug = lsstDebug.Info(__name__)
400  matchRes = self.matcher.matchObjectsToSources(
401  refCat = refCat,
402  sourceCat = sourceCat,
403  wcs = wcs,
404  refFluxField = refFluxField,
405  maxMatchDist = maxMatchDist,
406  )
407  self.log.logdebug("Found %s matches" % (len(matchRes.matches),))
408  if debug.display:
409  frame = int(debug.frame)
411  refCat = refCat,
412  sourceCat = matchRes.usableSourceCat,
413  matches = matchRes.matches,
414  exposure = exposure,
415  bbox = bbox,
416  frame = frame + 1,
417  title="Initial WCS",
418  )
419 
420  self.log.logdebug("Fitting WCS")
421  fitRes = self.wcsFitter.fitWcs(
422  matches = matchRes.matches,
423  initWcs = wcs,
424  bbox = bbox,
425  refCat = refCat,
426  sourceCat = sourceCat,
427  )
428  fitWcs = fitRes.wcs
429  scatterOnSky = fitRes.scatterOnSky
430  if debug.display:
431  frame = int(debug.frame)
433  refCat = refCat,
434  sourceCat = matchRes.usableSourceCat,
435  matches = matchRes.matches,
436  exposure = exposure,
437  bbox = bbox,
438  frame = frame + 2,
439  title="Fit TAN-SIP WCS",
440  )
441 
442  return pipeBase.Struct(
443  matches = matchRes.matches,
444  wcs = fitWcs,
445  scatterOnSky = scatterOnSky,
446  )
def lsst.meas.astrom.astrometry.AstrometryTask.loadAndMatch (   self,
  exposure,
  sourceCat 
)

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

Parameters
[in]exposureexposure whose WCS is to be fit
[in]sourceCatcatalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:
  • refCat reference object catalog of objects that overlap the exposure (with some margin) (an lsst::afw::table::SimpleCatalog)
  • matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
  • matchMeta metadata about the field (an lsst.daf.base.PropertyList)
Note
ignores config.forceKnownWcs, config.maxIter, config.matchDistanceSigma and config.minMatchDistanceArcSec

Definition at line 181 of file astrometry.py.

182  def loadAndMatch(self, exposure, sourceCat):
183  """!Load reference objects overlapping an exposure and match to sources detected on that exposure
184 
185  @param[in] exposure exposure whose WCS is to be fit
186  @param[in] sourceCat catalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
187 
188  @return an lsst.pipe.base.Struct with these fields:
189  - refCat reference object catalog of objects that overlap the exposure (with some margin)
190  (an lsst::afw::table::SimpleCatalog)
191  - matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
192  - matchMeta metadata about the field (an lsst.daf.base.PropertyList)
193 
194  @note ignores config.forceKnownWcs, config.maxIter, config.matchDistanceSigma
195  and config.minMatchDistanceArcSec
196  """
197  import lsstDebug
198  debug = lsstDebug.Info(__name__)
199 
200  expMd = self._getExposureMetadata(exposure)
201 
202  loadRes = self.refObjLoader.loadPixelBox(
203  bbox = expMd.bbox,
204  wcs = expMd.wcs,
205  filterName = expMd.filterName,
206  calib = expMd.calib,
207  )
208 
209  matchRes = self.matcher.matchObjectsToSources(
210  refCat = loadRes.refCat,
211  sourceCat = sourceCat,
212  wcs = expMd.wcs,
213  refFluxField = loadRes.fluxField,
214  maxMatchDist = None,
215  )
216 
217  distStats = self._computeMatchStatsOnSky(matchRes.matches)
218  self.log.info(
219  "Found %d matches with scatter = %0.3f +- %0.3f arcsec; " %
220  (len(matchRes.matches), distStats.distMean.asArcseconds(), distStats.distStdDev.asArcseconds())
221  )
222 
223  if debug.display:
224  frame = int(debug.frame)
226  refCat = loadRes.refCat,
227  sourceCat = sourceCat,
228  matches = matchRes.matches,
229  exposure = exposure,
230  bbox = expMd.bbox,
231  frame = frame,
232  title="Matches",
233  )
234 
235  return pipeBase.Struct(
236  refCat = loadRes.refCat,
237  matches = matchRes.matches,
238  matchMeta = self._createMatchMetadata(bbox=expMd.bbox, wcs=expMd.wcs, filterName=expMd.filterName),
239  )
def _getExposureMetadata
Extract metadata from an exposure.
Definition: astrometry.py:357
def loadAndMatch
Load reference objects overlapping an exposure and match to sources detected on that exposure...
Definition: astrometry.py:181
def lsst.meas.astrom.astrometry.AstrometryTask.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

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 sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
Returns
an lsst.pipe.base.Struct with these fields:
  • refCat reference object catalog of objects that overlap the exposure (with some margin) (an lsst::afw::table::SimpleCatalog)
  • matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
  • scatterOnSky median on-sky separation between reference objects and sources in "matches" (an lsst.afw.geom.Angle), or None if config.forceKnownWcs True
  • matchMeta metadata about the field (an lsst.daf.base.PropertyList)

Definition at line 151 of file astrometry.py.

152  def run(self, exposure, sourceCat):
153  """!Load reference objects, match sources and optionally fit a WCS
154 
155  This is a thin layer around solve or loadAndMatch, depending on config.forceKnownWcs
156 
157  @param[in,out] exposure exposure whose WCS is to be fit
158  The following are read only:
159  - bbox
160  - calib (may be absent)
161  - filter (may be unset)
162  - detector (if wcs is pure tangent; may be absent)
163  The following are updated:
164  - wcs (the initial value is used as an initial guess, and is required)
165  @param[in] sourceCat catalog of sourceCat detected on the exposure (an lsst.afw.table.SourceCatalog)
166  @return an lsst.pipe.base.Struct with these fields:
167  - refCat reference object catalog of objects that overlap the exposure (with some margin)
168  (an lsst::afw::table::SimpleCatalog)
169  - matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
170  - scatterOnSky median on-sky separation between reference objects and sources in "matches"
171  (an lsst.afw.geom.Angle), or None if config.forceKnownWcs True
172  - matchMeta metadata about the field (an lsst.daf.base.PropertyList)
173  """
174  if self.config.forceKnownWcs:
175  res = self.loadAndMatch(exposure=exposure, sourceCat=sourceCat)
176  res.scatterOnSky = None
177  else:
178  res = self.solve(exposure=exposure, sourceCat=sourceCat)
179  return res
def run
Load reference objects, match sources and optionally fit a WCS.
Definition: astrometry.py:151
def solve
Load reference objects overlapping an exposure, match to sources and fit a WCS.
Definition: astrometry.py:241
def loadAndMatch
Load reference objects overlapping an exposure and match to sources detected on that exposure...
Definition: astrometry.py:181
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:
  • refCat reference object catalog of objects that overlap the exposure (with some margin) (an lsst::afw::table::SimpleCatalog)
  • matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
  • scatterOnSky median on-sky separation between reference objects and sources in "matches" (an lsst.afw.geom.Angle)
  • matchMeta metadata about the field (an lsst.daf.base.PropertyList)
Note
ignores config.forceKnownWcs

Definition at line 241 of file astrometry.py.

242  def solve(self, exposure, sourceCat):
243  """!Load reference objects overlapping an exposure, match to sources and fit a WCS
244 
245  @return an lsst.pipe.base.Struct with these fields:
246  - refCat reference object catalog of objects that overlap the exposure (with some margin)
247  (an lsst::afw::table::SimpleCatalog)
248  - matches list of reference object/source matches (an lsst.afw.table.ReferenceMatchVector)
249  - scatterOnSky median on-sky separation between reference objects and sources in "matches"
250  (an lsst.afw.geom.Angle)
251  - matchMeta metadata about the field (an lsst.daf.base.PropertyList)
252 
253  @note ignores config.forceKnownWcs
254  """
255  import lsstDebug
256  debug = lsstDebug.Info(__name__)
257 
258  expMd = self._getExposureMetadata(exposure)
259 
260  loadRes = self.refObjLoader.loadPixelBox(
261  bbox = expMd.bbox,
262  wcs = expMd.wcs,
263  filterName = expMd.filterName,
264  calib = expMd.calib,
265  )
266  if debug.display:
267  frame = int(debug.frame)
269  refCat = loadRes.refCat,
270  sourceCat = sourceCat,
271  exposure = exposure,
272  bbox = expMd.bbox,
273  frame = frame,
274  title="Reference catalog",
275  )
276 
277  res = None
278  wcs = expMd.wcs
279  maxMatchDist = None
280  for i in range(self.config.maxIter):
281  iterNum = i + 1
282  try:
283  tryRes = self._matchAndFitWcs( # refCat, sourceCat, refFluxField, bbox, wcs, exposure=None
284  refCat = loadRes.refCat,
285  sourceCat = sourceCat,
286  refFluxField = loadRes.fluxField,
287  bbox = expMd.bbox,
288  wcs = wcs,
289  exposure = exposure,
290  maxMatchDist = maxMatchDist,
291  )
292  except Exception as e:
293  # if we have had a succeessful iteration then use that; otherwise fail
294  if i > 0:
295  self.log.info("Fit WCS iter %d failed; using previous iteration: %s" % (iterNum, e))
296  iterNum -= 1
297  break
298  else:
299  raise
300 
301  tryMatchDist = self._computeMatchStatsOnSky(tryRes.matches)
302  self.log.logdebug(
303  "Match and fit WCS iteration %d: found %d matches with scatter = %0.3f +- %0.3f arcsec; "
304  "max match distance = %0.3f arcsec" %
305  (iterNum, len(tryRes.matches), tryMatchDist.distMean.asArcseconds(),
306  tryMatchDist.distStdDev.asArcseconds(), tryMatchDist.maxMatchDist.asArcseconds()))
307  if maxMatchDist is not None:
308  if tryMatchDist.maxMatchDist >= maxMatchDist:
309  self.log.logdebug(
310  "Iteration %d had no better maxMatchDist; using previous iteration" % (iterNum,))
311  iterNum -= 1
312  break
313 
314  maxMatchDist = tryMatchDist.maxMatchDist
315  res = tryRes
316  wcs = res.wcs
317  if tryMatchDist.maxMatchDist.asArcseconds() < self.config.minMatchDistanceArcSec:
318  self.log.logdebug(
319  "Max match distance = %0.3f arcsec < %0.3f = config.minMatchDistanceArcSec; "
320  "that's good enough" %
321  (tryMatchDist.maxMatchDist.asArcseconds(), self.config.minMatchDistanceArcSec))
322  break
323 
324  self.log.info(
325  "Matched and fit WCS in %d iterations; "
326  "found %d matches with scatter = %0.3f +- %0.3f arcsec" %
327  (iterNum, len(tryRes.matches), tryMatchDist.distMean.asArcseconds(),
328  tryMatchDist.distStdDev.asArcseconds()))
329 
330  exposure.setWcs(res.wcs)
331 
332  return pipeBase.Struct(
333  refCat = loadRes.refCat,
334  matches = res.matches,
335  scatterOnSky = res.scatterOnSky,
336  matchMeta = self._createMatchMetadata(bbox=expMd.bbox, wcs=res.wcs, filterName=expMd.filterName)
337  )
def _matchAndFitWcs
Match sources to reference objects and fit a WCS.
Definition: astrometry.py:379
def _getExposureMetadata
Extract metadata from an exposure.
Definition: astrometry.py:357
def solve
Load reference objects overlapping an exposure, match to sources and fit a WCS.
Definition: astrometry.py:241

Member Data Documentation

string lsst.meas.astrom.astrometry.AstrometryTask._DefaultName = "astrometricSolver"
staticprivate

Definition at line 137 of file astrometry.py.

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

Definition at line 136 of file astrometry.py.


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