Structure

class modesolverpy.structure_base.Structure(x_step, y_step, x_max, y_max, x_min=0.0, y_min=0.0, n_background=1.0)[source]

Bases: modesolverpy.structure_base._AbstractStructure

Attributes Summary

eps np.array – A grid of permittivies representing the permittivity profile of the structure.
eps_func function – a function that when passed a x and y values, returns the permittivity profile of the structure, interpolating if necessary.
n np.array – A grid of refractive indices representing the refractive index profile of the structure.
n_func function – a function that when passed a x and y values, returns the refractive index profile of the structure, interpolating if necessary.
x np.array – The grid points in x.
x_ctr float – The centre distance in x.
x_pts int – The number of grid points in x.
xc np.array – The centre points of the x points.
xc_max float – The maximum value of xc.
xc_min float – The minimum value of xc.
xc_pts int – The number of points in xc.
y np.array – The grid points in y.
y_ctr float – The centre distance in y
y_pts int – The number of grid points in y.
yc np.array – The centre points of the y points.
yc_max float – The maximum value of yc.
yc_min float – The minimum value of yc.
yc_pts int – The number of points in yc.

Methods Summary

write_to_file([filename, plot]) Write the refractive index profile to file.

Attributes Documentation

eps

np.array – A grid of permittivies representing the permittivity profile of the structure.

eps_func

function – a function that when passed a x and y values, returns the permittivity profile of the structure, interpolating if necessary.

n

np.array – A grid of refractive indices representing the refractive index profile of the structure.

n_func

function – a function that when passed a x and y values, returns the refractive index profile of the structure, interpolating if necessary.

x

np.array – The grid points in x.

x_ctr

float – The centre distance in x.

x_pts

int – The number of grid points in x.

xc

np.array – The centre points of the x points.

xc_max

float – The maximum value of xc.

xc_min

float – The minimum value of xc.

xc_pts

int – The number of points in xc.

y

np.array – The grid points in y.

y_ctr

float – The centre distance in y

y_pts

int – The number of grid points in y.

yc

np.array – The centre points of the y points.

yc_max

float – The maximum value of yc.

yc_min

float – The minimum value of yc.

yc_pts

int – The number of points in yc.

Methods Documentation

write_to_file(filename='material_index.dat', plot=True)

Write the refractive index profile to file.

Parameters:
  • filename (str) – The nominal filename the refractive index data should be saved to.
  • plot (bool) – True if plots should be generates, otherwise False. Default is True.