stack module

stack.py is a subroutine of EMUstack that contains the Stack object, which takes layers with known scattering matrices and calculates the net scattering matrices of the multilayered stack.

Copyright (C) 2015 Bjorn Sturmberg, Kokou Dossou, Felix Lawrence

EMUstack is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class stack.Stack(layers, heights_nm=None, shears=None)[source]

Bases: object

Represents a stack of layers evaluated at one frequency.

This includes the semi-infinite input and output layers.

Parameters:
  • layers (tuple) – :ThinFilm:s and :NanoStruct:s ordered from top to bottom layer.
  • heights_nm (tuple) – the heights of the inside layers, i.e., all layers except for the top and bottom. This overrides any heights specified in the :ThinFilm: or :NanoStruct: objects.
  • shears (tuple) – the in-plane coordinates of each layer, including semi-inf layers in unit cell units (i.e. 0-1). e.g. ([0.0, 0.3], [0.1, 0.1], [0.2, 0.5]) for ‘2D_array’ e.g. ([0.0], [ 0.1], [0.5]) for ‘1D_array’. Only required if wish to shift layers relative to each other. Only relative difference matters.

Note that: scattering matrices, are organised as | TE -> TE | TM -> TE | | TE -> TM | TM -> TM |

calc_scat(pol='TE', incoming_amplitudes=None, calc_fluxes=True, save_scat_list=False)[source]

Calculate the transmission and reflection matrices of the stack.

In relation to the FEM mesh the polarisation is orientated, - along the y axis for TE - along the x axis for TM at normal incidence (polar angle theta = 0, azimuthal angle phi = 0).

Keyword Arguments:
 
  • pol (str) – Polarisation for which to calculate transmission & reflection.
  • incoming_amplitudes (int) – Which incoming PW order to give 1 unit of energy. If None the 0th order PW is selected.
  • calc_fluxes (bool) – Calculate energy fluxes. Only possible if top layer is a ThinFilm.
  • save_scat_list (bool) – If True, save tnet_list, rnet_list as property of stack for later access.
heights_nm()[source]

Update heights of each layer to those given in Keyword Arg ‘heights_nm’. If no heights specified in Stack, the heights of each layer object are used.

heights_norm()[source]

Normalise heights by the array period.

structures()[source]

Return :NanoStruct: or :ThinFilm: object of each layer.

total_height()[source]

Calculate total thickness of stack.