We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07946b8 commit 756e93eCopy full SHA for 756e93e
src/aspire/basis/polar_2d.py
@@ -81,11 +81,22 @@ def evaluate(self, v):
81
v, sz_roll = unroll_dim(v, 2)
82
nimgs = v.shape[1]
83
84
+ half_size = self.nrad * self.ntheta // 2
85
+
86
+ v = m_reshape(v, (self.nrad, self.ntheta, nimgs))
87
88
+ v = (v[:, :self.ntheta // 2, :]
89
+ + v[:, self.ntheta // 2:, :].conj())
90
91
+ v = m_reshape(v, (half_size, nimgs))
92
93
# finufftpy require it to be aligned in fortran order
94
x = np.empty((self._sz_prod, nimgs), dtype='complex128', order='F')
- finufftpy.nufft2d1many(self.freqs[0], self.freqs[1], v, 1, 1e-15,
- self.sz[0], self.sz[1], x)
95
+ finufftpy.nufft2d1many(self.freqs[0, :half_size],
96
+ self.freqs[1, :half_size],
97
+ v, 1, 1e-15, self.sz[0], self.sz[1], x)
98
x = m_reshape(x, (self.sz[0], self.sz[1], nimgs))
99
+ x = x.real
100
# return coefficients whose first two dimensions equal to self.sz
101
x = roll_dim(x, sz_roll)
102
0 commit comments