00001 00002 from slimproj import * 00003 from SLIMpy import * 00004 00005 from MigLinearOperator import Mig 00006 00007 def Migration( target, source , env ): 00008 """ 00009 """ 00010 #setup 00011 env = parse_env( env ) 00012 #declare vectors 00013 stra = vector( source[0] ) 00014 rtra = vector( source[1] ) 00015 slow = vector( source[2] ) 00016 00017 S = Scatter( stra.space, blocksize=[0,0,0,1] ) 00018 00019 scattered_stra = S * stra 00020 scattered_rtra = S * rtra 00021 00022 M = Mig( scattered_stra.space, nrmax=20, dtmax=5e-05, eps=0.01, readwrite='y', 00023 verb='y', ompnth=1, 00024 tmx=16, 00025 rwf=scattered_rtra, 00026 slo=slow, 00027 itype='o' 00028 ) 00029 migrated = M * scattered_stra 00030 00031 img = sum( migrated ) 00032 00033 cig = sum( [ mig.cig for mig in Diag(M) ] ) 00034 00035 # finish 00036 img.setName( target[0] ) 00037 cig.setName( target[1] ) 00038 00039 Execute( ) 00040 00041 stra = "stra.rsf" 00042 rtra = "rtra.rsf" 00043 slow = "slow.rsf" 00044 00045 #results 00046 img = "img.rsf" 00047 cig = "cig.rsf" 00048 00049 00050 00051 Rush( [ img, cig ], [stra,rtra,slow], Migration, 00052 runtype='dryrun', 00053 callbacks=['dist'], 00054 00055 NODELIST=['localhost','localhost'], 00056 np=20, 00057 00058 ) 00059 00060