summaryrefslogtreecommitdiffstats
path: root/python/astra/optomo.py
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2016-03-02 16:00:01 +0100
committerWillem Jan Palenstijn <wjp@usecode.org>2016-03-02 16:00:01 +0100
commitf24d9457f56f60aa927600261500e4ca681d0033 (patch)
tree6a0265038fbc6520703b41f1b684aa401a47bbdc /python/astra/optomo.py
parent14bef5ea534e4aa4e6d0819e728d0a8d2b0b7925 (diff)
parent0fb04ca6fb4fca23b9d1b885b9f075a90542997b (diff)
downloadastra-f24d9457f56f60aa927600261500e4ca681d0033.tar.gz
astra-f24d9457f56f60aa927600261500e4ca681d0033.tar.bz2
astra-f24d9457f56f60aa927600261500e4ca681d0033.tar.xz
astra-f24d9457f56f60aa927600261500e4ca681d0033.zip
Merge pull request #31 from dmpelt/small-fixes
Fix small Python errors
Diffstat (limited to 'python/astra/optomo.py')
-rw-r--r--python/astra/optomo.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/astra/optomo.py b/python/astra/optomo.py
index 4a64150..dd10713 100644
--- a/python/astra/optomo.py
+++ b/python/astra/optomo.py
@@ -160,7 +160,7 @@ class OpTomo(scipy.sparse.linalg.LinearOperator):
return self._matvec(v)
return scipy.sparse.linalg.LinearOperator.__mul__(self, v)
- def reconstruct(self, method, s, iterations=1, extraOptions = {}):
+ def reconstruct(self, method, s, iterations=1, extraOptions = None):
"""Reconstruct an object.
:param method: Method to use for reconstruction.
@@ -172,6 +172,8 @@ class OpTomo(scipy.sparse.linalg.LinearOperator):
:param extraOptions: Extra options to use during reconstruction (i.e. for cfg['option']).
:type extraOptions: :class:`dict`
"""
+ if extraOptions is None:
+ extraOptions={}
s = self.__checkArray(s, self.sshape)
sid = self.data_mod.link('-sino',self.pg,s)
v = np.zeros(self.vshape,dtype=np.float32)