MatDB

class pylayers.antprop.slab.MatDB(_fileini='', dm={})[source]

Bases: pylayers.util.project.PyLayers, dict

MatDB Class : Material database

di : dict associate numeric and alphanumeric keys

Methods Summary

add(**kwargs)

add a material in the DB

addgui([name])

Add a material in the DB

choose()

Choose a mat from matdir

delete(name)

Delete a material in the DB

edit(name)

Edit a material in the DB

info()

get MatDB info

load(_fileini)

Load a Material from a .ini file

save([_fileini])

save MatDB in an ini file

Methods Documentation

add(**kwargs)[source]

add a material in the DB

namestring

material name

cvalfloat or complex

epsilon or index

sigmafloat or complex

conductivity

murfloat

relative permeability

typstring

{‘epsr’|’ind’|,'reim',|’THz’|’itu’}

Different ways to enter a material are :

  1. ‘epsr’ : epsr and sigma

cval = epsr sigma = sigma

  1. ‘ind’ : indice @ fGHz

cval = indice

  1. ‘reim’ : real(epsr) and imag(epsr) @fGHz

  2. ‘THz’

  3. ITU parameter (a,b,c,d)

>>> from pylayers.antprop.slab import *
>>> m = MatDB()
>>> m.load('matDB.ini')
>>> m.add(name='ConcreteJcB',cval=3.5+0*1j,alpha_cmm1=1.9,fGHz=120,typ='THz')
>>> m.add(name='GlassJcB',cval=3.5+0*1j,alpha_cmm1=1.9,fGHz=120,typ='THz')
>>> out = m.save('Jacob.ini')
addgui(name='MAT')[source]

Add a material in the DB

name : string default ‘MAT’

choose()[source]

Choose a mat from matdir

delete(name)[source]

Delete a material in the DB

name : string

edit(name)[source]

Edit a material in the DB

name : vstring

info()[source]

get MatDB info

TODO : make a __repr__

load(_fileini)[source]

Load a Material from a .ini file

_fileinistring

name of the matDB file (usually matDB.ini)

TODO add the ITU format (abcd)

save(_fileini='matDB.ini')[source]

save MatDB in an ini file

[dict] id1 = name1 [name1] epsr = mur = sigma = roughness =