summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-18 11:46:54 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-18 11:46:54 +0100
commit99e8a3130d6ee161fc8e73faf526d7e0a7a9db44 (patch)
tree727519ad2d628106642187b8fd8ab8826d09e316
parentba52798816b85b724a9745f2ad063e052122221d (diff)
downloadregularization-99e8a3130d6ee161fc8e73faf526d7e0a7a9db44.tar.gz
regularization-99e8a3130d6ee161fc8e73faf526d7e0a7a9db44.tar.bz2
regularization-99e8a3130d6ee161fc8e73faf526d7e0a7a9db44.tar.xz
regularization-99e8a3130d6ee161fc8e73faf526d7e0a7a9db44.zip
Modified Region of interest; removed studentt
https://github.com/vais-ral/CCPi-FISTA_Reconstruction/commit/6fb8f5d188ed31d7a7077cba8ab7aea17b25b8bf
-rw-r--r--src/Python/ccpi/fista/FISTAReconstructor.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/Python/ccpi/fista/FISTAReconstructor.py b/src/Python/ccpi/fista/FISTAReconstructor.py
index 87dd2c0..33e67a3 100644
--- a/src/Python/ccpi/fista/FISTAReconstructor.py
+++ b/src/Python/ccpi/fista/FISTAReconstructor.py
@@ -108,9 +108,7 @@ class FISTAReconstructor():
'regularizer' ,
'ring_lambda_R_L1',
'ring_alpha',
- 'subsets',
- 'use_studentt_fidelity',
- 'studentt')
+ 'subsets')
self.acceptedInputKeywords = list(kw)
# handle keyworded parameters
@@ -141,10 +139,12 @@ class FISTAReconstructor():
if not 'region_of_interest'in kwargs.keys() :
if self.pars['ideal_image'] == None:
- pass
+ self.pars['region_of_interest'] = None
else:
- self.pars['region_of_interest'] = numpy.nonzero(
- self.pars['ideal_image']>0.0)
+ ## nonzero if the image is larger than m
+ fsm = numpy.frompyfunc(lambda x,m: 1 if x>m else 0, 2,1)
+
+ self.pars['region_of_interest'] = fsm(self.pars['ideal_image'], 0)
# the regularizer must be a correctly instantiated object
if not 'regularizer' in kwargs.keys() :
@@ -165,14 +165,7 @@ class FISTAReconstructor():
if not 'initialize' in kwargs.keys():
self.pars['initialize'] = False
- if not 'use_studentt_fidelity' in kwargs.keys():
- self.setParameter(studentt=False)
- else:
- print ("studentt {0}".format(kwargs['use_studentt_fidelity']))
- if kwargs['use_studentt_fidelity']:
- raise Exception('Not implemented')
-
- self.setParameter(studentt=kwargs['use_studentt_fidelity'])
+
def setParameter(self, **kwargs):