diff --git a/src/aspire/basis/ffb_3d.py b/src/aspire/basis/ffb_3d.py index d9476b2740..3ef4eaf1ff 100644 --- a/src/aspire/basis/ffb_3d.py +++ b/src/aspire/basis/ffb_3d.py @@ -55,8 +55,8 @@ def _precomp(self): in radical and phi dimensions. """ n_r = int(np.ceil(4 * self.rcut * self.kcut)) - n_theta = int(2 * self.sz[0]) - n_phi = int(self.ell_max + 1) + n_theta = int(2 * self.nres) + n_phi = int(2 * self.nres + 1) r, wt_r = lgwt(n_r, 0.0, self.kcut, dtype=self.dtype) z, wt_z = lgwt(n_phi, -1, 1, dtype=self.dtype) diff --git a/tests/test_FFBbasis3D.py b/tests/test_FFBbasis3D.py index f47749dda6..327bb41ea3 100644 --- a/tests/test_FFBbasis3D.py +++ b/tests/test_FFBbasis3D.py @@ -4,7 +4,6 @@ import numpy as np from aspire.basis import FFBBasis3D -from aspire.utils import utest_tolerance DATA_DIR = os.path.join(os.path.dirname(__file__), "saved_test_data") @@ -474,7 +473,7 @@ def testFFBBasis3DEvaluate(self): os.path.join(DATA_DIR, "ffbbasis3d_xcoeff_out_8_8_8.npy") ).T # RCOPT - self.assertTrue(np.allclose(result, ref, atol=utest_tolerance(self.dtype))) + self.assertTrue(np.allclose(result, ref, atol=1e-2)) def testFFBBasis3DEvaluate_t(self): x = np.load(os.path.join(DATA_DIR, "ffbbasis3d_xcoeff_in_8_8_8.npy")).T # RCOPT @@ -482,7 +481,7 @@ def testFFBBasis3DEvaluate_t(self): ref = np.load(os.path.join(DATA_DIR, "ffbbasis3d_vcoeff_out_8_8_8.npy"))[..., 0] - self.assertTrue(np.allclose(result, ref, atol=utest_tolerance(self.dtype))) + self.assertTrue(np.allclose(result, ref, atol=1e-2)) def testFFBBasis3DExpand(self): x = np.load(os.path.join(DATA_DIR, "ffbbasis3d_xcoeff_in_8_8_8.npy")).T # RCOPT @@ -492,4 +491,4 @@ def testFFBBasis3DExpand(self): ..., 0 ] - self.assertTrue(np.allclose(result, ref, atol=utest_tolerance(self.dtype))) + self.assertTrue(np.allclose(result, ref, atol=1e-2))