3.3.1. A_FMM.Stack

class A_FMM.Stack(layers: list[Layer] = None, d: list[float] = None)

Class representing the multylayer object

This class is used for the definition of the multilayer object to be simulated using fourier expansion (x and y axis) and scattering matrix algorithm (z axis). It is built from a list of layers and thicknesses. The value of the thickness of the first and last layer is irrelevant for the simulation, and it is used only to set the plotting window.

__init__(layers: list[Layer] = None, d: list[float] = None) None

Creator

Parameters:
  • layers (list, optional) – List of Layers: layers of the multylayer. Defaults to None (empty list).

  • d (list, optional) – List of float: thicknesses of the multylayer. Defaults to None (empty list).

Raises:

ValueError – Raised if d and mat have different lengths

Returns:

None.

Methods

__init__([layers, d])

Creator

add_layer(lay, d)

Add a layer at the end of the multilayer

bloch_modes()

Calculates Bloch modes of the stack.

calculate_epsilon([x, y, z])

Returns epsilon in the stack

calculate_fields(u1[, d2, x, y, z, components])

Returns fields in the stack

count_interface()

Helper function to identify the different layers and the needed interfaces

double()

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

flip()

Flip a solved stack

get_PR(i, j[, ordered])

Get phase of the relfection coefficient between modes

get_PT(i, j[, ordered])

Get phase of the transmission coefficient between modes

get_R(i, j[, ordered])

Get relfection coefficient between modes

get_T(i, j[, ordered])

Get transmission coefficient between modes.

get_el(sel, i, j)

Returns element of the scattering matrix

get_energybalance(u[, d])

Get total energy balance of the stack given the inputs

get_inout(u[, d])

Return data about the output of the structure given the input

get_prop(u, list_lay[, d])

Calculates the total poyinting vector in the requiested layers

inspect([st, details])

Print some info about the Stack

join(st2)

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

loop_intermediate(u1, d2)

Generator for the intermedia modal coefficients.

solve(k0[, kx, ky])

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

solve_S()

Builds the scattering matrix of the stacks.

solve_lay(k0[, kx, ky])

Solve the eigenvalue problem of all the layer in the stack

solve_serial(k0[, kx, ky])

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

transform([ex, ey, complex_transform])

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

Attributes

total_length