def test_norm_all3(): norm_func = norm.set_normfunc(bg, dk) res = norm.norm_all(np.array([im, im]), bg, dk=dk, beam_power=np.array([bp,bp]), beam_center=np.array([bc, bc]), crop=True) real = ndshift(np.zeros(im.shape, dtype=im.dtype)+r2, bc, mode='constant', cval=r3) real = np.array([real, real]) assert_allclose(real[:,2:,1:], res)
def test_norm_all1(): norm_func = norm.set_normfunc(bg, dk) res = norm.norm_all(np.array([im, im]), bg, dk=dk) real = np.zeros(im.shape, dtype=im.dtype)+r1 real = np.array([real, real]) assert_allclose(real, res)