|
3 | 3 | import numpy as np |
4 | 4 | from scipy.sparse.linalg import LinearOperator, cg |
5 | 5 |
|
6 | | -from aspire.basis.basis_utils import num_besselj_zeros |
7 | 6 | from aspire.image import Image |
8 | 7 | from aspire.utils import mdim_mat_fun_conj |
9 | | -from aspire.utils.matlab_compat import m_reshape |
10 | 8 | from aspire.volume import Volume |
11 | 9 |
|
12 | 10 | logger = logging.getLogger(__name__) |
@@ -47,46 +45,6 @@ def __init__(self, size, ell_max=None, dtype=np.float32): |
47 | 45 |
|
48 | 46 | self._build() |
49 | 47 |
|
50 | | - def _getfbzeros(self): |
51 | | - """ |
52 | | - Generate zeros of Bessel functions |
53 | | - """ |
54 | | - # get upper_bound of zeros of Bessel functions |
55 | | - upper_bound = min(self.ell_max + 1, 2 * self.nres + 1) |
56 | | - |
57 | | - # List of number of zeros |
58 | | - n = [] |
59 | | - # List of zero values (each entry is an ndarray; all of possibly different lengths) |
60 | | - zeros = [] |
61 | | - |
62 | | - # generate zeros of Bessel functions for each ell |
63 | | - for ell in range(upper_bound): |
64 | | - # for each ell, num_besselj_zeros returns the zeros of the |
65 | | - # order ell Bessel function which are less than 2*pi*c*R = nres*pi/2, |
66 | | - # the truncation rule for the Fourier-Bessel expansion |
67 | | - _n, _zeros = num_besselj_zeros( |
68 | | - ell + (self.ndim - 2) / 2, self.nres * np.pi / 2 |
69 | | - ) |
70 | | - if _n == 0: |
71 | | - break |
72 | | - else: |
73 | | - n.append(_n) |
74 | | - zeros.append(_zeros) |
75 | | - |
76 | | - # get maximum number of ell |
77 | | - self.ell_max = len(n) - 1 |
78 | | - |
79 | | - # set the maximum of k for each ell |
80 | | - self.k_max = np.array(n, dtype=int) |
81 | | - |
82 | | - max_num_zeros = max(len(z) for z in zeros) |
83 | | - for i, z in enumerate(zeros): |
84 | | - zeros[i] = np.hstack( |
85 | | - (z, np.zeros(max_num_zeros - len(z), dtype=self.dtype)) |
86 | | - ) |
87 | | - |
88 | | - self.r0 = m_reshape(np.hstack(zeros), (-1, self.ell_max + 1)).astype(self.dtype) |
89 | | - |
90 | 48 | def _build(self): |
91 | 49 | """ |
92 | 50 | Build the internal data structure to represent basis |
|
0 commit comments