3. API Reference

3.1. Creator

Creator([x_list, y_list, eps_lists])

Class for the definition of the eps profile in the layer

3.1.2. Methods

Creator.circle(e_in, e_out, r, n)

Creator.etched_stack(eps_uc, eps_lc, w, ...)

Creator.hole(h, w, r, e_core, e_lc, e_up, e_fill)

Rib waveguide with a hole in the middle

Creator.plot_eps([N])

Creator.rect(eps_core, eps_clad, w, h[, ...])

Rectangular waveguide

Creator.ridge(eps_core, eps_lc, eps_uc, w, h)

Rib waveguide with single layer

Creator.ridge_double(eps_core, eps_lc, ...)

Rib waveguide with double etch

Creator.ridge_pn(eps0, epsp, epsn, eps_lc, ...)

Creator.slab(eps_core, eps_lc, eps_uc, w[, ...])

1D slab in x direction

Creator.slab_y(eps_core, eps_lc, eps_uc, w)

1D slab in y direction

Creator.slow_2D(eps_core, eps_c, w, Z)

Creator.slow_general(eps_core, eps_lc, ...)

Creator.varied_epi(eps_back, data_list[, y_off])

Creator.varied_plane(eps_back, t, data_list)

Creator.x_stack(x_l, eps_l)

3.2. Layer

Layer(Nx, Ny, creator[, Nyx])

Class for the definition of a single layer

Layer_ani_diag(Nx, Ny, creator_x, creator_y, ...)

Class for the definition of a single layer anysitropic (diagonal) layer

Layer_empty_st(Nx, Ny, creator[, Nyx])

Class for the definition of an empy layer

Layer_num(Nx, Ny, func[, args, Nyx, NX, NY])

Class for the definition of a single layer from a function defining the dielectric profile

Layer_uniform(Nx, Ny, eps[, Nyx])

Class for the definition of a single uniform layer

3.2.6. Methods

Layer._check_array_shapes(u, d)

Chekcs that the modal amplitudea arrays and the coordinates arrays have consistent shapes

Layer._filter_componets([components])

Checks if the fileds components list contains only allowed ones

Layer._process_xy(x, y)

Transform the x and y coordinates between the real and computational space

Layer.add_transform_matrix([ex, FX, ey, FY])

Function for adding matrix of a coordinate transform

Layer.calculate_epsilon([x, y, z])

Return epsilon given the coordinates

Layer.calculate_field(u[, d, x, y, z, ...])

Return field given modal coefficient and coordinates

Layer.calculate_field_old(u[, d, x, y, z, ...])

Return field given modal coefficient and coordinates

Layer.clear()

Removes data created in mode method

Layer.coupling(u, up)

EXPERIMENTAL: Calculates coupling between two modes given their modal exapnsion

Layer.create_input(dic)

Creates the array of modal coefficient using a dictionary as input

Layer.eps_plot([pdf, N, s])

Function for plotting the dielectric consstat rebuit from plane wave expansion

Layer.get_Enorm()

Calculate field normalization

Layer.get_P_norm()

Creates array of single mode Poynting vector components.

Layer.get_Poyinting_norm()

Calculates the normalization matrix for the Poyinting vector calculations

Layer.get_Poynting(u[, d])

Calculates total Poynting vector in the layer given arrays of modal expansion

Layer.get_Poynting_single(i, u[, ordered])

Return the Poyinting vector of a single mode given the modal expansion in the layer

Layer.get_index([ordered])

Returns the effective idexes of the modes

Layer.get_input(func[, args, Nxp, Nyp, ...])

Expands an arbitrary fieldd shape on the basis of the layer eigenmodes

Layer.get_modal_field(i[, x, y, components])

Returns modal field profile

Layer.inspect([st])

Function for inspectig the attributes of a layer object

Layer.interface(lay)

Builds the Scattering matrix of the interface with another layer

Layer.mat_plot(name)

Plot the absolute values of the fourier trasnsform matrices

Layer.mode(k0[, kx, ky])

Calculates the eighenmode of the layer

Layer.overlap(u[, up])

EXPERIMENTAL: Calculates overlap between two fields given the modal expansion

Layer.plot_Ham(pdf)

Plot the matrix of the eigenvalue problem

Layer.transform([ex, ey, complex_transform])

Function for adding the real coordinate transfomr to the layer

3.3. Stack

Stack([layers, d])

Class representing the multylayer object

3.3.2. Methods

Stack.add_layer(lay, d)

Add a layer at the end of the multilayer

Stack.bloch_modes()

Calculates Bloch modes of the stack.

Stack.calculate_epsilon([x, y, z])

Returns epsilon in the stack

Stack.calculate_fields(u1[, d2, x, y, z, ...])

Returns fields in the stack

Stack.count_interface()

Helper function to identify the different layers and the needed interfaces

Stack.double()

Compose the scattering matrix of the stack with itself, doubling the structure

Stack.flip()

Flip a solved stack

Stack.get_PR(i, j[, ordered])

Get phase of the relfection coefficient between modes

Stack.get_PT(i, j[, ordered])

Get phase of the transmission coefficient between modes

Stack.get_R(i, j[, ordered])

Get relfection coefficient between modes

Stack.get_T(i, j[, ordered])

Get transmission coefficient between modes.

Stack.get_el(sel, i, j)

Returns element of the scattering matrix

Stack.get_energybalance(u[, d])

Get total energy balance of the stack given the inputs

Stack.get_inout(u[, d])

Return data about the output of the structure given the input

Stack.get_prop(u, list_lay[, d])

Calculates the total poyinting vector in the requiested layers

Stack.inspect([st, details])

Print some info about the Stack

Stack.join(st2)

Join the scattering matrix of the structure with the one of a second structure

Stack.loop_intermediate(u1, d2)

Generator for the intermedia modal coefficients.

Stack.solve(k0[, kx, ky])

Calculates the scattering matrix of the multilayer (cpu friendly version)

Stack.solve_S()

Builds the scattering matrix of the stacks.

Stack.solve_lay(k0[, kx, ky])

Solve the eigenvalue problem of all the layer in the stack

Stack.solve_serial(k0[, kx, ky])

Calculates the scattering matrix of the multilayer (memory friendly version)

Stack.transform([ex, ey, complex_transform])

Function for adding the real coordinate transform to all layers of the stack

3.4. S_matrix

S_matrix(N)

Implementation of the scattring matrix object

3.4.2. Methods

S_matrix.add(s)

Recursion method for joining two scattering matrices

S_matrix.add_left(s)

Recursion method for joining two scattering matrices

S_matrix.add_uniform(lay, d)

Recursion method for addig to self the progation matrix of a given layer

S_matrix.add_uniform_left(lay, d)

Recursion method for addig to self the progation matrix of a given layer

S_matrix.der(Sm, Sp[, h])

Calculates the first and second derivative of the scattering matrix with respec to the parameter par.

S_matrix.det()

Calculate the determinat of the scattering matrix

S_matrix.det_modes(kz, d)

S_matrix.int_f(S2, u)

Retirn the modal coefficient between two scattering matrces (self and S2)

S_matrix.int_f_tot(S2, u, d)

Retirn the modal coefficient between two scattering matrces (self and S2)

S_matrix.left(u1, d1)

Return the "right" inout and output vectors given the "left" ones

S_matrix.matrix()

Returns the full scattering matrix

S_matrix.output(u1, d2)

Returs the output vectors given the input vectors