@@ -0,0 +1,1883 @@
+from pylayers.simul.simulem import *%0A%0A# create a Simul object%0A%0AS = Simul()%0A%0A# loading a layout %0Afilestr = 'defstr'%0AS.layout(filestr+'.str')%0A%0A# setting transmitter%0A%0AS.tx = RadioNode(typ='tx')%0AS.tx.point(%5B1.2,1,1.4%5D)%0A%0A# setting receiver%0A%0AS.rx = RadioNode(typ='rx')%0AS.rx.point(%5B8,-1.2,1.5%5D)%0A%0AS.save()%0A%0A# print launching parameters%0AS.palch.info()%0A%0A# ang Tx : angular step from Tx%0AS.palch.angTx  = 1%0A%0A# ISB ang Incident Shadow Boundary angle (degree) %0AS.palch.ISBang = 90  %0A%0A# ray elimination Threshold %0AS.palch.ethreshold = 0.001%0A%0A# maximum depth%0AS.palch.maxdeep  = 10%0A%0A# typealgo = 0 (include diffraction) 1 (no diffraction)%0AS.palch.typalgo = 1%0Atitle = str(S.palch.angTx) + '-' +%5C%0A        str(S.palch.ISBang) + '-' +%5C%0A        str(S.palch.ethreshold) + '-' + %5C%0A        str(S.palch.maxdeep) + '-' + %5C%0A        str(S.palch.typalgo)%0A%0AS.palch.save()%0AS.pafreq.fghzmin=2%0AS.pafreq.fghzmax=11%0AS.pafreq.nf=181%0AS.pafreq.save()%0A# showing the simulation %0Aprint %22Launching %22%0Aprint %22-----------------%22%0AS.launching(1)%0A%0A# retrieve the launching tree%0A%0AL1 = S.getlaunch(1)%0A%0A# display the launching tree for different depths%0A%0Afig = plt.figure(figsize=(10,10))%0Aplt.title('launching parameters '+title+' '+filestr )%0Aplt.axis('off')%0AN = S.palch.maxdeep%0AM = N/2%0A#%0Afor k in range(N):%0A    ax = fig.add_subplot(M,2,k+1)%0A    fig,ax = L1.show(S.L,k+1)%0A%0Afig.savefig('../../../doc/auto_examples/simul/'+filestr+'-launching.png')    %0Aprint %22Tracing %22%0Aprint %22-----------------%22%0Aprint %22purc :%22,S.config.get('tud','purc')%0Afig = plt.figure()%0AS.tracing(1,1)%0Agr = GrRay3D()%0Agr.load(S.dtra%5B1%5D%5B1%5D,S.L)%0Af,a = S.L.showGs()%0Aplt.axis('on')%0Agr.show(a,np.arange(100))%0Aprint %22Tratotud %22%0Aprint %22-----------------%22%0Aprint %22purc :%22,S.config.get('tud','purc')%0AS.tratotud2(1,1)%0Agt = GrRayTud()%0A# loading rays in tud format %0Agt.load(S.dtud%5B1%5D%5B1%5D,S.dtang%5B1%5D%5B1%5D,S.drang%5B1%5D%5B1%5D,S.L.sl)%0Aprint %22Evalfiled %22%0Aprint %22-----------------%22%0AS.field2(1,1)%0A

add test_simulem.py