00001 00002 00003 from slimproj import * 00004 from SLIMpy import DotTest 00005 from SLIMpy.linear_operators import Identity 00006 from op_imospray import IMOSpray 00007 from slimpy_contrib.ana.problems.l2_minimization_problem import l2_min_problem 00008 00009 00010 from rsfproj import * 00011 00012 00013 Flow('model',None, 00014 ''' 00015 spike n1=256 d1=.016 nsp=2 k1=24,140 n2=1 n3=20 | 00016 boxsmooth rect1=20 00017 ''') 00018 00019 Flow( 'empty', 'model', 'scale dscale=0' ) 00020 Flow( 'data', 'model', 'imospray n2=10 d2=.60 o2=0. v=1.5' ) 00021 #Flow( 'adj', 'data', 'imospray n2=11 d2=.60 o2=0. v=1.5 adj=y' ) 00022 00023 00024 00025 def transform_callback( t,s,e, space ): 00026 A = IMOSpray( space, 11, d2=.60, o2=0, velocity=1.5 , adj=True ) 00027 return A.H 00028 00029 def inv_callback( t,s,e, space ): 00030 return Identity( space ) 00031 00032 Solve( 'inv', 'data' , 00033 problem=l2_min_problem, 00034 transform_callback=transform_callback, 00035 inv_callback=inv_callback, 00036 # post_mortem=True, 00037 no_del=True, 00038 debug=['stat','cmd'], 00039 # fastlsqr=True, 00040 maxiter=4 00041 ) 00042 00043 00044 #=============================================================================== 00045 # View 00046 #=============================================================================== 00047 00048 00049 #images = ['model','empty','data','empty','inv'] 00050 #labels = "Model:::::::Synthe-:tic data:::::" 00051 # 00052 #Result('invstack',images, 00053 # ''' 00054 # cat axis=2 ${SOURCES[1:%d]} | 00055 # dots dots=0 yreverse=1 gaineach=0 labels="%s" 00056 # ''' % (len(images),labels) ) 00057 00058 Result( 'flt', ['model'], 00059 ''' 00060 grey 00061 ''' %vars() ) 00062 00063 Result( 'mov', ['data'], 00064 ''' 00065 grey 00066 ''' %vars() ) 00067 00068 ## 00069 End()