diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2021-11-26 09:56:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 09:56:52 +0100 |
commit | 9d7018a5c6c5fd4574a4e7ef76878040566ec472 (patch) | |
tree | b8003a2bbcffb42db817e48ba3a3c1eb5ad51e23 /python/astra | |
parent | 4edf2032ee5b63d05e70c934f0508af67b30bdda (diff) | |
parent | e89c69e109b11131d49950e59af192b556a2c425 (diff) | |
download | astra-9d7018a5c6c5fd4574a4e7ef76878040566ec472.tar.gz astra-9d7018a5c6c5fd4574a4e7ef76878040566ec472.tar.bz2 astra-9d7018a5c6c5fd4574a4e7ef76878040566ec472.tar.xz astra-9d7018a5c6c5fd4574a4e7ef76878040566ec472.zip |
Merge pull request #281 from RendersJens/optomo-adjoint
Implemented _adjoint of OpTomo by equating it to _transpose
Diffstat (limited to 'python/astra')
-rw-r--r-- | python/astra/optomo.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/astra/optomo.py b/python/astra/optomo.py index c502f93..4efc3da 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: |