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