Show results of astrometry fitting.
456 def showAstrometry(exposure, wcs, allMatches, useMatches, frame=0, title=None, pause=False):
457 r"""!Show results of astrometry fitting 459 \param exposure Image to display 460 \param wcs Astrometric solution 461 \param allMatches List of all astrometric matches (including rejects) 462 \param useMatches List of used astrometric matches 463 \param frame Frame number for display 464 \param title Title for display 465 \param pause Pause to allow viewing of the display and optional debugging? 467 - Matches are shown in yellow if used in the Wcs solution, otherwise red 468 - +: Detected objects 469 - x: Catalogue objects 472 disp = afwDisplay.Display(frame=frame)
473 disp.mtv(exposure, title=title)
475 useIndices =
set(m.second.getId()
for m
in useMatches)
478 with disp.Buffering():
479 for i, m
in enumerate(allMatches):
480 x, y = m.second.getX(), m.second.getY()
481 pix = wcs.skyToPixel(m.first.getCoord())
483 isUsed = m.second.getId()
in useIndices
485 radii.append(np.hypot(pix[0] - x, pix[1] - y))
487 color = afwDisplay.YELLOW
if isUsed
else afwDisplay.RED
489 disp.dot(
"+", x, y, size=10, ctype=color)
490 disp.dot(
"x", pix[0], pix[1], size=10, ctype=color)
492 radii = np.array(radii)
493 print(
"<dr> = %.4g +- %.4g pixels [%d/%d matches]" % (radii.mean(), radii.std(),
494 len(useMatches), len(allMatches)))
500 reply = input(
"Debugging? [p]db [q]uit; any other key to continue... ").
strip()
513
def showAstrometry(exposure, wcs, allMatches, useMatches, frame=0, title=None, pause=False)
Show results of astrometry fitting.
daf::base::PropertySet * set