diff --git a/src/aspire/image/xform.py b/src/aspire/image/xform.py index 38f65d9be..8003b4a1c 100644 --- a/src/aspire/image/xform.py +++ b/src/aspire/image/xform.py @@ -144,7 +144,6 @@ def __init__(self, factor): self.multipliers = np.array(factor) def _forward(self, im, indices): - if self.multipliers.size == 1: # if we have a scalar multiplier im_new = im * self.multipliers.astype(im.dtype) else: diff --git a/src/aspire/reconstruction/estimator.py b/src/aspire/reconstruction/estimator.py index ac5e9caec..2bf0ec336 100644 --- a/src/aspire/reconstruction/estimator.py +++ b/src/aspire/reconstruction/estimator.py @@ -159,6 +159,7 @@ def apply_kernel(self, vol_coef, kernel=None): if kernel is None: kernel = self.kernel + vol = Coef(self.basis, vol_coef).evaluate() # returns a Volume vol = kernel.convolve_volume(vol) # returns a Volume vol_coef = self.basis.evaluate_t(vol) diff --git a/src/aspire/reconstruction/mean.py b/src/aspire/reconstruction/mean.py index b380c8788..e3888ee20 100644 --- a/src/aspire/reconstruction/mean.py +++ b/src/aspire/reconstruction/mean.py @@ -5,9 +5,10 @@ from scipy.linalg import norm from scipy.sparse.linalg import LinearOperator +from aspire import config from aspire.basis import Coef from aspire.nufft import anufft -from aspire.numeric import config, fft +from aspire.numeric import fft from aspire.numeric.scipy import cg from aspire.operators import evaluate_src_filters_on_grid from aspire.reconstruction import Estimator, FourierKernel, FourierKernelMatrix @@ -211,7 +212,6 @@ def conj_grad(self, b_coef, x0=None, tol=1e-5, regularizer=0): precond_kernel = self.precond_kernel if regularizer > 0: precond_kernel += regularizer - M = LinearOperator( (self.r * count, self.r * count), matvec=partial(self.apply_kernel, kernel=precond_kernel),