MIRAG.dictionnaire package

MIRAG.dictionnaire.dico_func

Complementary module for creating the hyperbola dictionary for convolutional ADMM for mathematical and physical approaches

MIRAG.dictionnaire.dico_func.Deph1(n, param)[source]

functions for calculating phase shift (and, if losses, attenuation) terms

Parameters
  • n (int) – number of layers

  • param (float) – dictionaries of parameters given by parametre_MAXGs or parametre_4L

Returns

out – phase shift at layer n

Return type

float

MIRAG.dictionnaire.dico_func.Deph2(n, param)[source]

functions for calculating phase shift (and, if losses, attenuation) terms

Parameters
  • n (int) – number of layers

  • param (float) – dictionaries of parameters given by parametre_MAXGs or parametre_4L

Returns

out – phase shift at layer n

Return type

float

MIRAG.dictionnaire.dico_func.atompos2C(ta, tm, freq, cond, marge=0.1)[source]

Returns the equivalent permittivity homogenized by model 1 (“parametre_MAXGs”) with 2 layers: (air-(matrix+inclusions)). Can be modified by using model 2 (“parametre_4L”) which uses 4 layers: (air-matrix-target-matrix)

Parameters
  • ta (float) – thickness of the air layer (m)

  • tm (float) – effective permittivity of the medium (relative)

  • freq (float) – operating frequency of the radar

  • cond (float) – conductivity of the medium

  • margin (float{0.1}, optional) – variation margin on the permittivity of the medium and the thickness of the air to obtain a solution.

Returns

out – homogenized equivalent permittivity

Return type

float

Notes

This approach is interesting but remains subjective with notably the accepted margins and the “while” loop which takes us away from the physical world (~tinkering) and makes the processing more cumbersome.

MIRAG.dictionnaire.dico_func.eps2vprop(par_vp, margeR=0.0001, diff=0.075)[source]

Retourne la vitesse de propagation fictive de matériaux à permittivité équivalente à partir des paramètres physiques et du modèle d’homogénéisation

Parameters
  • par_vp (float) – dictionnaire de paramètres (fréquence,permittivité effective du milieu,conductivité, épaisseur de l’air)

  • margeR (float{1e-4}, optional) – marge appliqué aux paramètres du dico pour trouver les permittivtés

  • diff (float{0.075}, optional) – critère de différence entre chaque vitesse calculée (%).

Returns

vprM – array de vitesse de propagation

Return type

float

Notes

Cette approche est intéressante mais reste subjective avec notamment les marges acceptées et le critère de différence qui nous éloigne un peu du monde physique (~bricolage)

MIRAG.dictionnaire.dico_func.filtre2D_B(Nx, Nt, x, t, coef=1)[source]

Performs a 2D Hanning filter centered on the atomic position with a dilation factor coef

Parameters
  • Nx (int) – horizontal dimension of the atom image

  • Nt (int) – vertical dimension of the atom image

  • x (int) – horizontal central coordinate of the atom (in pixels)

  • t (int) – vertical central coordinate of the atom (in pixels)

  • coef (int{1}, optional) – filter dilation coefficient (1 = filter for 256x256 window)

Returns

M – Centered attenuation matrix (Nx*Ny)

Return type

float

MIRAG.dictionnaire.dico_func.homogeneisation_an(angle, gamma_cp, cste, c_i, polarisation='TE')[source]

analytical method of homogenization.

Equivalent permittivity calculation function giving the same total reflection coefficient for several layers as a layer at the vacuum interface.

Parameters
  • angle (float) – angle of incidence of the wave considered

  • gamma_cp (float) – total reflection coefficient (2/4 layers)

  • cste (float) –

    dictionary of constants:

    • pulsation (w)

    • empty permeability (mu0)

    • empty permittivity (e0)

  • c_i (float) – dictionary of physical parameters of the first layer permeability, permittivity and conductivity of the material (mui,ei,sigi)

  • polarization (str{"TE", "TM"}) – desired polarization: electric “TE” or magnetic “TM”.

Returns

e_eq – relative equivalent permittivity

Return type

float

MIRAG.dictionnaire.dico_func.maxwell_garnett(m, n, deli)[source]

Returns the effective permittivity of a material of type inclusion in a matrix.

For more information : https://en.wikipedia.org/wiki/Effective_medium_approximations

Parameters
  • m (float) – matrix permittivity vector

  • n (float) – permittivity vector of inclusions (targets)

  • deli (float) – volume fraction of inclusions

Returns

eff – effective permittivity table

Return type

float

MIRAG.dictionnaire.dico_func.parametre_4L(frequence=350000000.0, conductivity=0.0, permitivity=[1.0, 1.0], thick_air=1.0, thick_mat=[1.0, 1.0])[source]

Returns the complete dictionary of parameters needed to homogenization of the permittivity for a total reflection coefficient in the case of a 4 layer model (air-matrix-target-matrix)

Parameters
  • frequence (float{350E6}, optional) – frequency of operation of the radar

  • conductivity (float{0.0}, optional) – conductivity of the medium

  • permitivity (list{[1.0, 1.0]}, optional) – material permittivity (relative)(matrix+target)

  • thick_air (float{1.0}, optional) – thickness of the air layer (m)

  • thick_mat (list{[1.0, 1.0]}, optional) – material thickness (m)(matrix+target)

Returns

  • cste (float) – dictionary of constants (frequency, wavelength, vacuum permittivity and pulsation)

  • c_i (float) – REDUNDANT dictionary of parameters of the first layer (permeability, permittivity, conductivity)

  • p (float) – complete dictionary of all parameters for each layer (permeability, permittivity, conductivity, angle)

  • … warning::To do

    Modify the function to avoid redundancy of the output variable c_i.

See also

parametre_MAXGs

MIRAG.dictionnaire.dico_func.parametre_MAXGs(frequence=350000000.0, conductivity=0, permitivity=1, thick_air=1)[source]

Returns the complete dictionary of parameters needed to homogenization of the permittivity for a total reflection coefficient in the case of a 2 layer model (air-(matrix+inclusion))

Parameters
  • frequence (float{350E6}, optional) – frequency of operation of the radar

  • conductivity (float{0.0}, optional) – conductivity of the medium

  • permitivity (list{[1.0, 1.0]}, optional) – material permittivity (relative)(matrix+target)

  • thick_air (float{1.0}, optional) – thickness of the air layer (m)

Returns

  • cste (float) – dictionary of constants (frequency, wavelength, vacuum permittivity and pulsation)

  • c_i (float) – REDUNDANT dictionary of parameters of the first layer (permeability, permittivity, conductivity)

  • p (float) – complete dictionary of all parameters for each layer (permeability, permittivity, conductivity, angle)

  • … warning::To do

    Modify the function to avoid redundancy of the output variable c_i.

See also

parametre_4L

MIRAG.dictionnaire.dico_func.ref(n, param, polarisation)[source]

functions to calculate the reflection coefficients at the nth interface

Parameters
  • n (int) – number of layers

  • param (float) – dictionaries of parameters given by parametre_MAXGs or parametre_4L

  • polarization (str{"TE", "TM"}) – desired polarization : electric “TE” or magnetic “TM”.

Returns

out – reflection coefficients at the n_th interface

Return type

float

MIRAG.dictionnaire.dico_func.ref_tot(x, param, polarisation)[source]

recursive function to determine the total reflection coefficient

Parameters
  • x (int{1}) – number of the starting layer (1)

  • param (float) – dictionaries of parameters given by parametre_MAXGs or parametre_4L

  • polarization (str{"TE", "TM"}) – desired polarization : electric “TE” or magnetic “TM”.

Returns

out – array of total reflections

Return type

float

MIRAG.dictionnaire.dico_func.tra(n, param, polarisation)[source]

functions to calculate the transmission coefficients at the nth interface

Parameters
  • n (int) – number of layers

  • param (float) – dictionaries of parameters given by parametre_MAXGs or parametre_4L

  • polarization (str{"TE", "TM"}) – desired polarization : electric “TE” or magnetic “TM”.

Returns

out – transmission coefficients at the n_th interface

Return type

float

MIRAG.dictionnaire.dico_func.tran_tot(x, param, polarisation)[source]

recursive function to determine the total transmission coefficient

Parameters
  • x (int{1}) – number of the starting layer (1)

  • param (float) – dictionaries of parameters given by parametre_MAXGs or parametre_4L

  • polarization (str{"TE", "TM"}) – desired polarization : electric “TE” or magnetic “TM”.

Returns

out – array of total transmissions

Return type

float

MIRAG.dictionnaire.dico_func.v_prop(eps, sig, ome)[source]

Calculates the speed of propagation of a wave from the permittivity permittivity, conductivity and frequency.

Parameters
  • float (ome) – electrical permittivity (can be complex) (\(F/m\))

  • float – electrical conductivity (can be complex) (\(\Omega \cdot m\))

  • float – electrical frequency (\(Hz\))

Returns

out – propagation speed

Return type

float

MIRAG.dictionnaire.dico_phy

Hyperbola dictionary creation module for convolutional ADMM by physical approach

MIRAG.dictionnaire.dico_phy.create_dicoPHY2(paraDic)[source]

Higher function of creation of hyperbolas or atoms dictionary by physical modeling

Parameters

paraDic (dic) – dictionary of creation parameters

Notes

  • paraDic[‘dim’] (array) : Dimension of the radargram

  • paraDic[‘std’] (array) : Input vector of sigma parameter

  • paraDic[‘position’] (array) : Position of the top of the hyperbola

  • paraDic[‘v_prop’] (array) : Input vector of velocity

  • paraDic[‘coef’] (array) : 2D filter coefficient for the size of the hyperbola

  • paraDic[‘size_ns_m’] (array) : value of corresponding measure in time and meter for the radar.

Returns

DioH – structure of the form {“atoms”: Dico, “param”: param} where Dico is the tensor of the hyperbolas (Nx*Ny*K) and param the tensor of the corresponding features for each hyperbola (K*3) (velocity, attenuation coefficient, sigma)

Return type

dic

MIRAG.dictionnaire.dico_phy.dico_PHY2(Dimxt, pos, v, dim_n_m, A=None, sigma=5)[source]

A function to generate an atom or a hyperbola to create a dictionary for create a dictionary for the GPR reconstruction from the physical from the physical modeling of the problem.

Parameters
  • Dimxt (list{[256,256]}) – dimension of the hyperbola (Nx * Ny)

  • pos (list{[60,128]}) – centered position of the hyperbola

  • v (float) – propagation speed for the hyperbola

  • dim_n_m (list{[900,40]}) – real dimensions of the image (y = [ns] and x= [m])

  • A (int{None}, optional) – attenuation matrix (Nx * Ny)

  • sigma (int{5}, optional) – parameter thickness of the hyperbola.

Returns

h – constructed atom of dimension (Nx*Ny)

Return type

float

MIRAG.dictionnaire.dico_phy.param_loadPHY(size, opt)[source]

Loads the parameters and returns a dictionary of atoms of dimension “size

Parameters
  • size (list{[256,256]}) – dimension of the original image, thus of the atoms.

  • opt (dic) – dictionary of options for creating hyperbolas

Returns

  • atm (dic) – structure of the form {“atoms”: Dico, “param”: param} where Dico is the hyperbola tensor of the hyperbolas (Nx*Ny*K) and param the tensor of the corresponding features for each hyperbola (K*3)

  • opt (dic) – input dictionary augmented with the values used by the functions (for tracking changes)

Warning

WARNING

Modification of the dictionary creation parameters directly in the python file!

To do

  • Add the option to read the parameters from a YAML file

MIRAG.dictionnaire.dico_phy_plot

MIRAG.dictionnaire.dictionary

Module for creating the hyperbola dictionary for convolutional ADMM based on the publication 1

MIRAG.dictionnaire.dictionary.create_dicoH(paraDic)[source]

Superior function for creating hyperbolas or atoms dictionary (Based on 1.)

Parameters

paradic (dic) – dictionnary of parameters

Notes

  • paraDic[‘dim’] (array) : Dimension of the radargram

  • paraDic[‘scale_a’] (array) : Input vector of a parameter

  • paraDic[‘scale_s’] (array) : Input vector of sigma parameter

  • paraDic[‘f’] (array) : Input vector of f parameter

  • paraDic[‘position’] (array) : Position of the top of the hyperbola

Returns

DioH – structure of the form {“atoms”: Dico, “param”: param} where Dico is the tensor of the hyperbolas (Nx*Ny*K) and param the tensor of the corresponding features for each hyperbola (K*4)

Return type

dic

MIRAG.dictionnaire.dictionary.hyperbola_atomTH(Nx, Nt, x_0, t_0, A=None, sigma=5, a=0.8, f=500)[source]

A function to generate a hyperbola atom in order to create a create a dictionary for GPR reconstruction. (Based on 1.)

Parameters
  • Nx (int) – Size of the GPR radargram in the distance dimension.

  • Nt (int) – Size of the GPR radargram in the time dimension

  • x_0 (float) – Position of the hyperobla in the distance dimension

  • t_0 (float) – position of the hyperobla in the time dimension

  • A (ndarray{None}, optional) – Attenuation array

  • sigma (int{5}, optional) – Thickness of the hyperbola

  • a (float{0.8}, optional) – Affects the opening of the hyperbola.

  • f (int{500}, optional) – Affects the flatness at the top of the hyperbola.

Returns

h – constructed atom of dimension (Nx*Ny)

Return type

float

References

1(1,2,3)

‘Parsimonious decomposition of the GPR useful signal from the Hyperbola dictionary’, Guillaume Terasse, Jean-Marie Nicolas, Emmanuel Trouvé and Émeline Drouet

Available at: https://hal.archives-ouvertes.fr/hal-01351242

MIRAG.dictionnaire.dictionary.param_load(size, opt)[source]

Loads the parameters and returns a dictionary of atoms of dimension “size

Parameters
  • size (list{[256,256]}) – dimension of the original image, thus of the atoms.

  • opt (dic) – dictionary of options for creating hyperbolas

Returns

  • out (dic) – structure of the form {“atoms”: Dico, “param”: param} where Dico is the hyperbola tensor of the hyperbolas (Nx*Ny*K) and param the tensor of the corresponding features for each hyperbola (K*4)

  • opt (dic) – input dictionary augmented with the values used by the functions (for tracking changes)

Warning

WARNING

Modification of the dictionary creation parameters directly in the python file!

To do

  • Add the option to read the parameters from a YAML file