23 __all__ = [
"sourceMatchStatistics"]
29 """Compute statistics on the accuracy of a wcs solution, using a precomputed list 30 of matches between an image and a catalogue 33 matchList is a lsst::afw::detection::SourceMatch object 36 A dictionary storing the following quanities 37 meanOfDiffInPixels Average distance between image and catalogue position (in pixels) 38 rmsOfDiffInPixels Root mean square of distribution of distances 39 quartilesOfDiffInPixels An array of 5 values giving the boundaries of the quartiles of the 45 raise ValueError(
"matchList contains no elements")
49 for match
in matchList:
53 cx = catObj.getXAstrom()
54 cy = catObj.getYAstrom()
56 sx = srcObj.getXAstrom()
57 sy = srcObj.getYAstrom()
59 dist[i] = np.hypot(cx-sx, cy-sy)
65 for f
in (0.25, 0.50, 0.75):
69 quartiles.append(dist[i])
72 values[
'diffInPixels_Q25'] = quartiles[0]
73 values[
'diffInPixels_Q50'] = quartiles[1]
74 values[
'diffInPixels_Q75'] = quartiles[2]
75 values[
'diffInPixels_mean'] = dist.mean()
76 values[
'diffInPixels_std'] = dist.std()
def sourceMatchStatistics(matchList, log=None)