Skip to content

Commit 5e2d49a

Browse files
authored
Merge pull request #575 from ComputationalCryoEM/nufft_hotfix
Force finufft signals to be complex
2 parents d5d7747 + 3dcfaeb commit 5e2d49a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/aspire/nufft/finufft.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def transform(self, signal):
103103
f"Signal frame to be transformed must have shape {self.sz}",
104104
)
105105

106+
# FINUFFT was designed for a complex input array
107+
signal = np.array(signal, copy=False, dtype=self.complex_dtype, order="C")
108+
106109
result = self._transform_plan.execute(signal)
107110

108111
return result
@@ -135,6 +138,9 @@ def adjoint(self, signal):
135138
if self.ntransforms == 1:
136139
signal = signal.reshape(self.num_pts)
137140

141+
# FINUFFT was designed for a complex input array
142+
signal = np.array(signal, copy=False, dtype=self.complex_dtype, order="C")
143+
138144
result = self._adjoint_plan.execute(signal)
139145

140146
return result

0 commit comments

Comments
 (0)