Interface

class pylayers.antprop.slab.Interface(fGHz=array([2.4]), theta=array([[0.+0.j]]), name='')[source]

Bases: pylayers.util.project.PyLayers

Interface between 2 medium

The adopted axis convention is the following

  • nf : axis = 0 frequency axis

  • nt : axis = 1 angular axis

  • p : axis = 2 parallel polarization axis

  • o : axis = 3 orhogonal polarization axis

fGHz np.array (nf,1) theta np.array (1,nt) Ip np.array (nf,nt,2,2) Io np.array (nf,nt,2,2)

Methods Summary

RT([metalic, RT])

evaluate Reflection and Transmission matrix

loss0(fGHz[, display])

evaluate Loss at normal incidence theta=0

losst(fGHz[, display, dB])

evaluate Loss

pcolor([dB])

display of R & T coefficients wrt frequency an angle

plotwrt([var, kv])

plot R & T coefficients with respect to angle or frequency

tocolor(fGHz)

convert transmission into color

Methods Documentation

RT(metalic=False, RT='RT')[source]

evaluate Reflection and Transmission matrix

metalic : boolean RT : string

choose R or T

\[\begin{split}R = \left[\begin{array}[cc]R_{\perp} & 0\\0 & R_{\para}\end{array}\right] T = \left[\begin{array}[cc]T_{\perp} & 0\\0 & T_{\para}\end{array}\right]\end{split}\]

R : np.array (f , th , 2, 2) T : np.array (f , th , 2, 2)

loss0(fGHz, display=False)[source]

evaluate Loss at normal incidence theta=0

fGHz : np.array (nf,1) display : boolean default (False)

Lo : loss in dB polarization orthogonal Lp : loss in dB polarization parallel

losst(fGHz, display=False, dB=True)[source]

evaluate Loss

fGHz : np.arrray (nf) display : boolean

default False

dBbooean

default True

Lonp.array

Loss orthogonal polarization (dB)

Lpnp.array

Loss parallel polarization (dB)

>>> from pylayers.antprop.slab import *

pylayers.antprop.coverage pylayers.antprop.loss

pcolor(dB=False)[source]

display of R & T coefficients wrt frequency an angle

dB : boolean default False

plotwrt(var='a', kv=0, **kwargs)[source]

plot R & T coefficients with respect to angle or frequency

kv : int variable index polar: string ‘po’, # po | p | o (parallel+ortho | parallel | ortogonal) coeff: string ‘RT’, # RT | R | T (Reflexion & Transmission ) | Reflexion | Transmission var: string ‘a’, # a | f angle | frequency typ : string ‘m’ | ‘r’ | ‘d’ | ‘l20’ mod rad deg dB

>>> from pylayers.antprop.slab import *
>>> import matplotlib.pylab as plt
>>> import numpy as np
>>> theta = np.arange(0,np.pi/2,0.01)
>>> fGHz = np.arange(0.1,10,0.2)
>>> sl = SlabDB('matDB.ini','slabDB.ini')
>>> mat = sl.mat
>>> lmatname = [mat['AIR'],mat['WOOD']]
>>> II = MatInterface(lmatname,0,fGHz,theta)
>>> II.RT()
>>> fig,ax = II.plotwrt(var='a',kv=10,typ=['m'])
>>> air = mat['AIR']
>>> brick = mat['BRICK']
>>> II = MatInterface([air,brick],0,fGHz,theta)
>>> II.RT()
>>> fig,ax = II.plotwrt(var='f',color='k',typ=['m'])
>>> plt.ion()
>>> plt.show()

(Source code)

tocolor(fGHz)[source]

convert transmission into color

fGHz : np.array

colstring

hexadecimal color

pylayers.gis.layout.showGs