Simnet2cir¶
-
class
pylayers.exploit.simnet.
Simnet2cir
(simnetfile='pyray.ini')[source]¶ Bases:
object
This class allows to perform a raytracing simulation from a simulnet simulation. First of using it, you MUST have run a simulnet simulation.
1) From your Project directory, configure simulnet.ini save section with: Save =[‘pyray’]
Run simulnet
from pylayers.simul.simulnet import * S = Simul() S.runsimul()
3) At the end of the simulnet simulation, a ‘netsave’ folder has been created into your Pylayers project directory. This folder contains all required files for Simnet2cir computation
4) Launch the Raytracing simulation from the pre-computed simulnet simulation:
from pylayers.exploit.simnet import * E = Simnet2cir() E.compute() #
See CIR results using pltciri or pltcir:
>>> E.pltcir(1,2,1) >>> E.pltciri(1,2)
Methods Summary
compute
()Compute Raytracing simulation with the given simulation files
load
()Load simulnet_data configuration file
on_key
(event)Events on key stroke
onclick
(event)Events on click
pltcir
(itx, irx, pn[, fig])Plot channel impulse response for Tx,Rx and a specified position Parameters ———- itx : int node number irx : int node number pn : int position index of the Rx
pltciri
(itx, irx)Plot channel impulse response interactiveley.
srchpoint
(x, y)Search from the closest point (x,y) into self.tx.position and self.rx.position
Methods Documentation
-
pltcir
(itx, irx, pn, fig=[])[source]¶ Plot channel impulse response for Tx,Rx and a specified position Parameters ———-
- itxint
node number
- irxint
node number
- pnint
position index of the Rx
-
pltciri
(itx, irx)[source]¶ Plot channel impulse response interactiveley. diplay all node position of Tx and Rx and chose for which link you display the CIR.
Once you have call self.pltciri(node1,node2) 1) Press ‘t’ on the displayed graph to chose the Tx 2) Press ‘x’ on the displayed graph to chose the Rx 3) Press Enter to display CIR betwen Tx-Rx
- itxint
node number
- irxint
node number
usage
>>> W = W2() >>> W.pltciri(6,1)