23 __all__ = [
"sourceMatchStatistics"]
29 """Compute statistics on the accuracy of a wcs solution, using a 30 precomputed list of matches between an image and a catalog. 34 matchList : `lsst.afw.detection.SourceMatch` 35 List of matches between sources and references to compute statistics 41 Value dictionary with fields: 43 - diffInPixels_mean : Average distance between image and 44 catalog position in pixels (`float`). 45 - diffInPixels_std : Root mean square of distribution of distances 47 - diffInPixels_Q25 : 25% quantile boundary of the match dist 48 distribution (`float`). 49 - diffInPixels_Q50 : 50% quantile boundary of the match dist 50 distribution (`float`). 51 - diffInPixels_Q75 : 75% quantile boundary of the match 52 dist distribution (`float`). 57 raise ValueError(
"matchList contains no elements")
61 for match
in matchList:
65 cx = catObj.getXAstrom()
66 cy = catObj.getYAstrom()
68 sx = srcObj.getXAstrom()
69 sy = srcObj.getYAstrom()
71 dist[i] = np.hypot(cx-sx, cy-sy)
77 for f
in (0.25, 0.50, 0.75):
81 quartiles.append(dist[i])
84 values[
'diffInPixels_Q25'] = quartiles[0]
85 values[
'diffInPixels_Q50'] = quartiles[1]
86 values[
'diffInPixels_Q75'] = quartiles[2]
87 values[
'diffInPixels_mean'] = dist.mean()
88 values[
'diffInPixels_std'] = dist.std()
def sourceMatchStatistics(matchList, log=None)