22 from __future__
import absolute_import, division, print_function
24 __all__ = [
"sourceMatchStatistics"]
30 """Compute statistics on the accuracy of a wcs solution, using a precomputed list 31 of matches between an image and a catalogue 34 matchList is a lsst::afw::detection::SourceMatch object 37 A dictionary storing the following quanities 38 meanOfDiffInPixels Average distance between image and catalogue position (in pixels) 39 rmsOfDiffInPixels Root mean square of distribution of distances 40 quartilesOfDiffInPixels An array of 5 values giving the boundaries of the quartiles of the 46 raise ValueError(
"matchList contains no elements")
50 for match
in matchList:
54 cx = catObj.getXAstrom()
55 cy = catObj.getYAstrom()
57 sx = srcObj.getXAstrom()
58 sy = srcObj.getYAstrom()
60 dist[i] = np.hypot(cx-sx, cy-sy)
66 for f
in (0.25, 0.50, 0.75):
70 quartiles.append(dist[i])
73 values[
'diffInPixels_Q25'] = quartiles[0]
74 values[
'diffInPixels_Q50'] = quartiles[1]
75 values[
'diffInPixels_Q75'] = quartiles[2]
76 values[
'diffInPixels_mean'] = dist.mean()
77 values[
'diffInPixels_std'] = dist.std()
def sourceMatchStatistics(matchList, log=None)