summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-03-11 13:34:09 -0400
committerEdoardo Pasca <edo.paskino@gmail.com>2019-03-11 13:34:09 -0400
commit42f1020414fc9e722484f626e07f5eaf3f689a92 (patch)
tree2a871b69274841c5246290f755c7a4b8894e872e /Wrappers
parent6a76bd07171ccf4e95372e7d84f6b381aad9e557 (diff)
downloadframework-42f1020414fc9e722484f626e07f5eaf3f689a92.tar.gz
framework-42f1020414fc9e722484f626e07f5eaf3f689a92.tar.bz2
framework-42f1020414fc9e722484f626e07f5eaf3f689a92.tar.xz
framework-42f1020414fc9e722484f626e07f5eaf3f689a92.zip
change default method to range_geometry and domain_geometry
Diffstat (limited to 'Wrappers')
-rwxr-xr-xWrappers/Python/ccpi/optimisation/ops.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/ops.py b/Wrappers/Python/ccpi/optimisation/ops.py
index e9e7f44..6afb97a 100755
--- a/Wrappers/Python/ccpi/optimisation/ops.py
+++ b/Wrappers/Python/ccpi/optimisation/ops.py
@@ -49,9 +49,9 @@ class Operator(object):
def allocate_adjoint(self):
'''Allocates memory on the X space'''
raise NotImplementedError
- def range_dim(self):
+ def range_geometry(self):
raise NotImplementedError
- def domain_dim(self):
+ def domain_geometry(self):
raise NotImplementedError
def __rmul__(self, other):
'''reverse multiplication of Operator with number sets the variable scalar in the Operator'''
@@ -97,7 +97,8 @@ class TomoIdentity(Operator):
self.s1 = 1.0
self.geometry = geometry
-
+ def is_linear(self):
+ return True
def direct(self,x,out=None):
if out is None:
@@ -128,6 +129,10 @@ class TomoIdentity(Operator):
raise ValueError("Wrong geometry type: expected ImageGeometry of AcquisitionGeometry, got ", type(self.geometry))
def allocate_adjoint(self):
return self.allocate_direct()
+ def range_geometry(self):
+ return self.geometry
+ def domain_geometry(self):
+ return self.geometry