LSSTApplications  17.0+103,17.0+11,17.0+61,18.0.0+13,18.0.0+25,18.0.0+5,18.0.0+52,18.0.0-4-g68ffd23,18.1.0-1-g0001055+8,18.1.0-1-g03d53ef+1,18.1.0-1-g1349e88+28,18.1.0-1-g2505f39+22,18.1.0-1-g380d4d4+27,18.1.0-1-g5315e5e+1,18.1.0-1-g5e4b7ea+10,18.1.0-1-g7e8fceb+1,18.1.0-1-g85f8cd4+23,18.1.0-1-g9a6769a+13,18.1.0-1-ga1a4c1a+22,18.1.0-1-gd55f500+17,18.1.0-12-g42eabe8e+10,18.1.0-14-gd04256d+15,18.1.0-16-g430f6a53+1,18.1.0-17-gd2166b6e4,18.1.0-18-gb5d19ff+1,18.1.0-2-gfbf3545+7,18.1.0-2-gfefb8b5+16,18.1.0-3-g52aa583+13,18.1.0-3-g62b5e86+14,18.1.0-3-g8f4a2b1+17,18.1.0-3-g9bc06b8+7,18.1.0-3-gb69f684+9,18.1.0-4-g1ee41a7+1,18.1.0-5-g6dbcb01+13,18.1.0-5-gc286bb7+3,18.1.0-6-g48bdcd3+2,18.1.0-6-gd05e160+9,18.1.0-7-gc4d902b+2,18.1.0-7-gebc0338+8,18.1.0-9-gae7190a+10,w.2019.38
LSSTDataManagementBasePackage
Classes | Functions
lsst.meas.extensions.astrometryNet.anetAstrometry Namespace Reference

Classes

class  ANetAstrometryConfig
 
class  ANetAstrometryTask
 Use astrometry.net to match input sources with a reference catalog and solve for the Wcs. More...
 

Functions

def showAstrometry (exposure, wcs, allMatches, useMatches, frame=0, title=None, pause=False)
 Show results of astrometry fitting. More...
 

Function Documentation

◆ showAstrometry()

def lsst.meas.extensions.astrometryNet.anetAstrometry.showAstrometry (   exposure,
  wcs,
  allMatches,
  useMatches,
  frame = 0,
  title = None,
  pause = False 
)

Show results of astrometry fitting.

Parameters
exposureImage to display
wcsAstrometric solution
allMatchesList of all astrometric matches (including rejects)
useMatchesList of used astrometric matches
frameFrame number for display
titleTitle for display
pausePause to allow viewing of the display and optional debugging?
  • Matches are shown in yellow if used in the Wcs solution, otherwise red
    • +: Detected objects
    • x: Catalogue objects

Definition at line 450 of file anetAstrometry.py.

450 def showAstrometry(exposure, wcs, allMatches, useMatches, frame=0, title=None, pause=False):
451  r"""!Show results of astrometry fitting
452 
453  \param exposure Image to display
454  \param wcs Astrometric solution
455  \param allMatches List of all astrometric matches (including rejects)
456  \param useMatches List of used astrometric matches
457  \param frame Frame number for display
458  \param title Title for display
459  \param pause Pause to allow viewing of the display and optional debugging?
460 
461  - Matches are shown in yellow if used in the Wcs solution, otherwise red
462  - +: Detected objects
463  - x: Catalogue objects
464  """
465  import lsst.afw.display as afwDisplay
466  disp = afwDisplay.Display(frame=frame)
467  disp.mtv(exposure, title=title)
468 
469  useIndices = set(m.second.getId() for m in useMatches)
470 
471  radii = []
472  with disp.Buffering():
473  for i, m in enumerate(allMatches):
474  x, y = m.second.getX(), m.second.getY()
475  pix = wcs.skyToPixel(m.first.getCoord())
476 
477  isUsed = m.second.getId() in useIndices
478  if isUsed:
479  radii.append(np.hypot(pix[0] - x, pix[1] - y))
480 
481  color = afwDisplay.YELLOW if isUsed else afwDisplay.RED
482 
483  disp.dot("+", x, y, size=10, ctype=color)
484  disp.dot("x", pix[0], pix[1], size=10, ctype=color)
485 
486  radii = np.array(radii)
487  print("<dr> = %.4g +- %.4g pixels [%d/%d matches]" % (radii.mean(), radii.std(),
488  len(useMatches), len(allMatches)))
489 
490  if pause:
491  import sys
492  while True:
493  try:
494  reply = input("Debugging? [p]db [q]uit; any other key to continue... ").strip()
495  except EOFError:
496  reply = ""
497 
498  if len(reply) > 1:
499  reply = reply[0]
500  if reply == "p":
501  import pdb
502  pdb.set_trace()
503  elif reply == "q":
504  sys.exit(1)
505  else:
506  break
507 
def showAstrometry(exposure, wcs, allMatches, useMatches, frame=0, title=None, pause=False)
Show results of astrometry fitting.
daf::base::PropertySet * set
Definition: fits.cc:884
bool strip
Definition: fits.cc:883