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