Show results of astrometry fitting.
470 def showAstrometry(exposure, wcs, allMatches, useMatches, frame=0, title=None, pause=False):
471 """!Show results of astrometry fitting
473 \param exposure Image to display
474 \param wcs Astrometric solution
475 \param allMatches List of all astrometric matches (including rejects)
476 \param useMatches List of used astrometric matches
477 \param frame Frame number for display
478 \param title Title for display
479 \param pause Pause to allow viewing of the display and optional debugging?
481 - Matches are shown in yellow if used in the Wcs solution, otherwise red
482 - +: Detected objects
483 - x: Catalogue objects
486 ds9.mtv(exposure, frame=frame, title=title)
488 useIndices = set(m.second.getId()
for m
in useMatches)
491 with ds9.Buffering():
492 for i, m
in enumerate(allMatches):
493 x, y = m.second.getX(), m.second.getY()
494 pix = wcs.skyToPixel(m.first.getCoord())
496 isUsed = m.second.getId()
in useIndices
498 radii.append(numpy.hypot(pix[0] - x, pix[1] - y))
500 color = ds9.YELLOW
if isUsed
else ds9.RED
502 ds9.dot(
"+", x, y, size=10, frame=frame, ctype=color)
503 ds9.dot(
"x", pix[0], pix[1], size=10, frame=frame, ctype=color)
505 radii = numpy.array(radii)
506 print "<dr> = %.4g +- %.4g pixels [%d/%d matches]" % (radii.mean(), radii.std(),
507 len(useMatches), len(allMatches))
513 reply = raw_input(
"Debugging? [p]db [q]uit; any other key to continue... ").strip()
520 import pdb;pdb.set_trace()
def showAstrometry
Show results of astrometry fitting.