def test_find_specular_ridge(self): xvals = np.linspace(-10, 10, 201) yvals = np.ceil(gauss(xvals, 0, 1000, 0, 1)) detector = np.repeat(yvals[:, np.newaxis], 1000, axis=1).T detector_sd = np.sqrt(detector) output = plp.find_specular_ridge(detector[np.newaxis, :], detector_sd[np.newaxis, :]) assert_(len(output) == 2) assert_almost_equal(output[0][0], 100)
def test_find_specular_ridge(self): xvals = np.linspace(-10, 10, 201) yvals = np.ceil(gauss(xvals, 0, 1000, 0, 1)) detector = np.repeat(yvals[:, np.newaxis], 1000, axis=1).T detector_sd = np.sqrt(detector) output = plp.find_specular_ridge(detector[np.newaxis, :], detector_sd[np.newaxis, :]) assert_(len(output) == 5) assert_almost_equal(output[0][0], 100)