Coverage for tests/test_kdtree.py : 56%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
lsst.utils.tests.init()
""" Make sure the API provided by scipy to the kdTree algorithm is functional. """ _ra = np.linspace(0., 2.*np.pi) _dec = np.linspace(-np.pi, np.pi)
Ra, Dec = np.meshgrid(_ra, _dec) tree = utils._buildTree(Ra.flatten(), Dec.flatten())
x, y, z = utils._xyz_from_ra_dec(_ra, _dec) indx = tree.query_ball_point(list(zip(x, y, z)), utils.xyz_angular_radius())
self.assertEqual(indx.shape, _ra.shape)
lsst.utils.tests.init() unittest.main()
|