Signature¶
- 
class pylayers.antprop.signature.Signature(sig)[source]¶
- Bases: - pylayers.util.project.PyLayers,- object- class Signature - seq : list of interaction point (edges (>0) or vertices (<0) [int] typ : list of interaction type 1-R 2-T 3-D [int] pa : tail point of interaction segment (2xN) ndarray pb : head point of interaction segment (2xN) ndarray pc : center point of interaction segment (2xN) ndarray - Methods Summary - backtrace(tx, rx, M)- backtrace given image, tx, and rx - ev(L)- evaluation of Signature - ev2(L)- evaluation of Signature - evf(L)- evaluation of Signature (fast version) - evtx(L, tx, rx)- evaluate transmitter - image(tx)- compute the tx’s images with respect to the signature segments - info()- show(L, tx, rx, **kwargs)- Parameters - sig2ray(L, pTx, pRx)- convert a signature to a 2D ray - unfold()- unfold a given signature - Methods Documentation - 
backtrace(tx, rx, M)[source]¶
- backtrace given image, tx, and rx - txndarray (2x1)
- transmitter 
- rxndarray (2x1)
- receiver 
- Mndarray (2xN)
- N image points obtained using self.image method 
 - isvalidbool
- True if the backtrace ends successfully 
- Yndarray (2 x (N+2))
- sequence of points corresponding to the seek ray 
 - >>> import matplotlib.pyplot as plt >>> import numpy as np >>> from pylayers.gis.layout import * >>> from pylayers.antprop.signature import * >>> L = Layout('defstr.ini') >>> s = Signature(seq) >>> tx = np.array([760,1113]) >>> rx = np.array([762,1114]) >>> s.ev(L) >>> M = s.image(tx) >>> isvalid,Y = s.backtrace(tx,rx,M) - >>> fig,ax = L.showG('s',labels=1,aw=1,axes=1) >>> l1 = ax.plot(tx[0],tx[1],'or') >>> l2 = ax.plot(rx[0],rx[1],'og') >>> l3 = ax.plot(M[0,:],M[1,:],'ob') >>> l4 = ax.plot(Y[0,:],Y[1,:],'xk') >>> ray = np.hstack((np.hstack((tx.reshape(2,1),Y)),rx.reshape(2,1))) >>> l5 = ax.plot(ray[0,:],ray[1,:],color='#999999',alpha=0.6,linewidth=0.6) >>> plt.show() - For mathematical details see : - @INPROCEEDINGS{6546704, author={Laaraiedh, Mohamed and Amiot, Nicolas and Uguen, Bernard}, booktitle={Antennas and Propagation (EuCAP), 2013 7th European Conference on}, title={Efficient ray tracing tool for UWB propagation and - localization modeling}, - year={2013}, pages={2307-2311},} 
 - 
ev(L)[source]¶
- evaluation of Signature - L : Layout - This function converts the sequence of interactions into numpy arrays which contains coordinates of segments extremities involved in the signature. - At that stage coordinates of extremities (tx and rx) is not known yet - members data - pa tail of segment (2xN) pb head of segment (2xN) pc the center of segment (2xN) - norm normal to the segment if segment in case the interaction is a point the normal is undefined and then set to 0. 
 - 
ev2(L)[source]¶
- evaluation of Signature - L : Layout - This function converts the sequence of interactions into numpy arrays which contains coordinates of segments extremities involved in the signature. At that level the coordinates of extremities (tx and rx) is not known yet. - members data - pa tail of segment (2xN) pb head of segment (2xN) pc the center of segment (2xN) - norm normal to the segment if segment in case the interaction is a point the normal is undefined and then set to 0 
 - 
evf(L)[source]¶
- evaluation of Signature (fast version) - L : Layout - This function converts the sequence of interactions into numpy arrays which contains coordinates of segments extremities involved in the signature. - members data - pa tail of segment (2xN) pb head of segment (2xN) 
 - 
evtx(L, tx, rx)[source]¶
- evaluate transmitter - L : Layout tx : np.array (2xN) rx : np.array (2xM) - DEPRECATED 
 - 
image(tx)[source]¶
- compute the tx’s images with respect to the signature segments - tx : numpy.ndarray - M : numpy.ndarray 
 
-