From e89c69e109b11131d49950e59af192b556a2c425 Mon Sep 17 00:00:00 2001 From: Jens Renders Date: Wed, 24 Mar 2021 22:44:51 +0100 Subject: Implemented _adjoint of OpTomo by equating it to _transpose --- python/astra/optomo.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/astra') diff --git a/python/astra/optomo.py b/python/astra/optomo.py index ff67791..5ecff8f 100644 --- a/python/astra/optomo.py +++ b/python/astra/optomo.py @@ -95,6 +95,9 @@ class OpTomo(scipy.sparse.linalg.LinearOperator): def _transpose(self): return self.transposeOpTomo + # real operator + _adjoint = _transpose + def __checkArray(self, arr, shp): if len(arr.shape)==1: arr = arr.reshape(shp) @@ -249,6 +252,9 @@ class OpTomoTranspose(scipy.sparse.linalg.LinearOperator): def _transpose(self): return self.parent + # real operator + _adjoint = _transpose + def __mul__(self,s): # Catch the case of a backprojection of 2D/3D data if isinstance(s, np.ndarray) and s.shape==self.parent.sshape: -- cgit v1.2.3