diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-20 17:07:34 +0100 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-20 17:07:34 +0100 |
commit | d5d7d09132f159156fd0ebf586c07e68a10a6bed (patch) | |
tree | b07750579da40def9ca8a62bb906f933275f55ac /src/Python/ccpi | |
parent | 52f7080153a00bd3f7276a4be0a79f7aa82c6196 (diff) | |
parent | e1df6bc9ab2f1e0d66cb7385d295b7cb66a2ea43 (diff) | |
download | regularization-d5d7d09132f159156fd0ebf586c07e68a10a6bed.tar.gz regularization-d5d7d09132f159156fd0ebf586c07e68a10a6bed.tar.bz2 regularization-d5d7d09132f159156fd0ebf586c07e68a10a6bed.tar.xz regularization-d5d7d09132f159156fd0ebf586c07e68a10a6bed.zip |
Merge branch origin/pythonize into pythonize
Diffstat (limited to 'src/Python/ccpi')
-rw-r--r-- | src/Python/ccpi/fista/FISTAReconstructor.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Python/ccpi/fista/FISTAReconstructor.py b/src/Python/ccpi/fista/FISTAReconstructor.py index fda9cf0..85bfac5 100644 --- a/src/Python/ccpi/fista/FISTAReconstructor.py +++ b/src/Python/ccpi/fista/FISTAReconstructor.py @@ -583,3 +583,27 @@ class FISTAReconstructor(): string = 'Iteration Number {0} | RMS Error {1} | Objective {2} \n' print (string.format(i,Resid_error[i], self.objective[i])) return (X , X_t, t) + + def os_iterate(self, Xin=None): + print ("FISTA Reconstructor: iterate") + + if Xin is None: + if self.getParameter('initialize'): + X = self.initialize() + else: + N = vol_geom['GridColCount'] + X = numpy.zeros((N,N,SlicesZ), dtype=numpy.float) + else: + # copy by reference + X = Xin + # store the output volume in the parameters + self.setParameter(output_volume=X) + X_t = X.copy() + + # some useful constants + proj_geom , vol_geom, sino , \ + SlicesZ, weights , alpha_ring , + lambdaR_L1 , L_const = self.getParameter( + ['projector_geometry' , 'output_geometry', + 'input_sinogram', 'SlicesZ' , 'weights', 'ring_alpha' , + 'ring_lambda_R_L1', 'Lipschitz_constant']) |