Slab

class pylayers.antprop.slab.Slab(name, matDB, ds={})[source]

Bases: pylayers.antprop.slab.Interface, dict

Handle a Slab

A Slab is a sequence of layers which have

  • a given width

  • a given material from the material DB

name :

Slab name

nbmat :

Number of layers

index :

Slab Index

lmatname :

list of material name

lthick :

list of thickness of layers

color :

color of slab dor display

linewidth :

linewidth for structure display

mat : Associated Material Database

evaluated : Boolean

Methods Summary

conv(matDB)

build the Slab list of materials lmat

eval([fGHz, theta, compensate, RT])

evaluation of the Slab

excess_grdelay([fGHz, theta])

calculate transmission excess delay in ns

filter(win[, theta])

filtering waveform

info()

display Slab Info

loss0([fGHz])

calculate loss for theta=0 at frequency (fGHz)

losst(fGHz, theta)

Calculate loss w.r.t angle and frequency

show([fGHz, theta, dtype, dB])

show slab Reflection and Transmission coefficient

tocolor([fGHz])

convert slab properrties into a color

Methods Documentation

conv(matDB)[source]

build the Slab list of materials lmat

eval(fGHz=array([1.]), theta=array([0., 0.03205707, 0.06411414, 0.0961712, 0.12822827, 0.16028534, 0.19234241, 0.22439948, 0.25645654, 0.28851361, 0.32057068, 0.35262775, 0.38468481, 0.41674188, 0.44879895, 0.48085602, 0.51291309, 0.54497015, 0.57702722, 0.60908429, 0.64114136, 0.67319843, 0.70525549, 0.73731256, 0.76936963, 0.8014267, 0.83348377, 0.86554083, 0.8975979, 0.92965497, 0.96171204, 0.9937691, 1.02582617, 1.05788324, 1.08994031, 1.12199738, 1.15405444, 1.18611151, 1.21816858, 1.25022565, 1.28228272, 1.31433978, 1.34639685, 1.37845392, 1.41051099, 1.44256806, 1.47462512, 1.50668219, 1.53873926, 1.57079633]), compensate=False, RT='RT')[source]

evaluation of the Slab

fGHz : frequency GHz ( np.array([1.0]) ) theta : np.array

incidence angle (from normal) radians

compensate : boolean RT : string

excess_grdelay(fGHz=array([2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3., 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9]), theta=array([0]))[source]

calculate transmission excess delay in ns

fGHz : array default arange(2.4,4,0.1) theta : default 0

delayo : excess delay polarization o delayp : excess delay polarization p

#>>> from pylayers.antprop.slab import * #>>> from matplotlib.pylab import * #>>> import numpy as np #>>> sl = SlabDB(‘matDB.ini’,’slabDB.ini’) #>>> s1 = sl[‘PARTITION’] #>>> fGHz = np.arange(3.1,10.6,0.1) #>>> delayo,delayp = s1.excess_grdelay(fGHz,0) #>>> lineo = plt.plot(fGHz[0:-1],delayo) #>>> linep = plt.plot(fGHz[0:-1],delayp) #>>> plt.show()

filter(win, theta=0)[source]

filtering waveform

win : Waveform

wout : Waveform

NOT IMPLEMENTED

info()[source]

display Slab Info

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> from pylayers.antprop.slab import *
>>> sl = SlabDB('matDB.ini','slabDB.ini')
>>> lmatname = ['PLATRE-57GHz','AIR','PLATRE-57GHz']
>>> lthick = [0.018,0.03,0.018]
>>> sl.add('placo',lmatname,lthick)
>>> theta = np.arange(0,np.pi/2,0.01)
>>> fGHz = np.array([57.5])
>>> sl['placo'].eval(fGHz,theta)
>>> fig,ax=sl['placo'].plotwrt(var='a',typ=['m'])
>>> plt.ion()
>>> plt.show()

(Source code)

loss0(fGHz=2.4)[source]

calculate loss for theta=0 at frequency (fGHz)

fGHz : frequency (GHz) np.array() default 2.4

Lo : np.array Loss at 0 deg polarization ortho Lp : np.array Loss at 0 deg polarization para

>>> from pylayers.antprop.slab import *
>>> sl = SlabDB('matDB.ini','slabDB.ini')
>>> s1 = sl['AIR']
>>> Lo,Lp = s1.loss0(2.4)
>>> assert (np.allclose(Lo[0],0)),'Problem with AIR slab loss'
>>> assert (np.allclose(Lo[0],Lp[0])),'something wrong with polarization'
losst(fGHz, theta)[source]

Calculate loss w.r.t angle and frequency

fGHz : np.array() frequency (GHz)

theta : np.array theta angle (radians)

Lo : np.array Loss orthogonal

Lp : np.array Loss paralell

show(fGHz=2.4, theta=array([0., 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1., 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.2, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27, 1.28, 1.29, 1.3, 1.31, 1.32, 1.33, 1.34, 1.35, 1.36, 1.37, 1.38, 1.39, 1.4, 1.41, 1.42, 1.43, 1.44, 1.45, 1.46, 1.47, 1.48, 1.49, 1.5, 1.51, 1.52, 1.53, 1.54, 1.55, 1.56, 1.57]), dtype=<class 'numpy.float64'>, dB=False)[source]

show slab Reflection and Transmission coefficient

fGHz : float theta : np.array dtype : display : string {‘modulus’} dB : boolean False

tocolor(fGHz=array([2.4]))[source]

convert slab properrties into a color

fGHz : np.array

>>> sl = SlabDB('matDB.ini','slabDB.ini')
>>> s1 = sl['PARTITION']
>>> col24 = s1.tocolor(np.array([2.4]))
>>> fGHz = np.arange(0.5,8,100)
>>> col8 = s1.tocolor(fGHz)