diff options
author | algol <dkazanc@hotmail.com> | 2018-08-23 00:21:02 +0100 |
---|---|---|
committer | algol <dkazanc@hotmail.com> | 2018-08-23 00:21:02 +0100 |
commit | ed0bb129f1b03f1cbfee40a1d3444aefe176c7cf (patch) | |
tree | 40bcf55f8288bce6b626cbb39e16675c6b0cc2f6 | |
parent | da5901a9fa132091eef500e73eeb9197ff2a3f05 (diff) | |
download | framework-ed0bb129f1b03f1cbfee40a1d3444aefe176c7cf.tar.gz framework-ed0bb129f1b03f1cbfee40a1d3444aefe176c7cf.tar.bz2 framework-ed0bb129f1b03f1cbfee40a1d3444aefe176c7cf.tar.xz framework-ed0bb129f1b03f1cbfee40a1d3444aefe176c7cf.zip |
some updates to demo
-rw-r--r-- | Wrappers/Python/wip/demo_imat_multichan_RGLTK.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Wrappers/Python/wip/demo_imat_multichan_RGLTK.py b/Wrappers/Python/wip/demo_imat_multichan_RGLTK.py index 148aef8..0ec116f 100644 --- a/Wrappers/Python/wip/demo_imat_multichan_RGLTK.py +++ b/Wrappers/Python/wip/demo_imat_multichan_RGLTK.py @@ -32,7 +32,7 @@ ProjAngleChannels = np.zeros((totalAngles,totChannels,n,n),dtype='float32') ######################################################################### print ("Loading the data...") -MainPath = '/media/algol/HD-LXU3/DATA_DANIIL/' # path to data +MainPath = '/media/algol/336F96987817D4B4/DATA/IMAT_DATA/' # path to data pathname0 = '{!s}{!s}'.format(MainPath,'PSI_DATA/DATA/Sample/') counterFileName = 4675 # A main loop over all available angles @@ -105,7 +105,7 @@ for i in range(0,totChannels,1): f = Norm2sq(Aop,DataContainer(sino_channel),c=0.5) print ("Run FISTA-TV for least squares") - lamtv = 10 + lamtv = 5 opt = {'tol': 1e-4, 'iter': 200} g_fgp = FGP_TV(lambdaReg = lamtv, iterationsTV=50, @@ -138,13 +138,14 @@ for i in range(0,totChannels,1): plt.show() """ # Saving images into fits using astrapy if required -add_val = np.min(REC_chan[:]) -REC_chan += abs(add_val) -REC_chan = REC_chan/np.max(REC_chan[:])*65535 counter = 0 filename = 'FISTA_TV_imat_slice' for i in range(totChannels): + im = REC_chan[i,:,:] + add_val = np.min(im[:]) + im += abs(add_val) + im = im/np.max(im[:])*65535 outfile = '{!s}_{!s}_{!s}.fits'.format(filename,str(selectedVertical_slice),str(counter)) - hdu = fits.PrimaryHDU(np.uint16(REC_chan[i,:,:])) + hdu = fits.PrimaryHDU(np.uint16(im)) hdu.writeto(outfile, overwrite=True) counter += 1
\ No newline at end of file |