mode_calcs module

mode_calcs.py is a subroutine of EMUstack that contains methods to calculate the modes of a given layer, either analytically (class ‘Anallo’) or from the FEM routine (class ‘Simmo’).

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 mode_calcs.Anallo(thin_film, light)[source]

Bases: mode_calcs.Modes

Interaction of one :Light: object with one :ThinFilm: object.

Like a :Simmo:, but for a thin film, and calculated analytically.

Z()[source]

Return the wave impedance as a 1D array.

calc_kz()[source]

Return a sorted 1D array of grating orders’ kz.

calc_modes()[source]

Calculate the modes of homogeneous layer analytically.

k()[source]

Return the normalised wavenumber in the background material.

n()[source]

Return refractive index of an object at its wavelength.

specular_incidence(pol='TE')[source]

Return a vector of plane wave amplitudes corresponding to specular incidence in the specified polarisation.

i.e. all elements are 0 except the zeroth order.

class mode_calcs.EMUstack

Bases: object

class mode_calcs.Modes[source]

Bases: object

Super-class from which Simmo and Anallo inherit common functionality.

air_ref()[source]

Return an :Anallo: for air for the same :Light: as this.

calc_1d_grating_orders(max_order)[source]

Return the grating order indices px and py, unsorted.

calc_2d_grating_orders(max_order)[source]

Return the grating order indices px and py, unsorted.

k_pll_norm()[source]
prop_fwd(height_norm)[source]

Return the matrix P corresponding to forward propagation/decay.

shear_transform(coords)[source]

Return the matrix Q corresponding to a shear transformation to coordinats coords.

wl_norm()[source]

Return normalised wavelength (wl/period).

class mode_calcs.Simmo(structure, light)[source]

Bases: mode_calcs.Modes

Interaction of one :Light: object with one :NanoStruc: object.

Inherits knowledge of :NanoStruc:, :Light: objects Stores the calculated modes of :NanoStruc: for illumination by :Light:

calc_modes(num_BMs=None)[source]

Run a Fortran FEM calculation to find the modes of a structured layer.

mode_calcs.r_t_mat(lay1, lay2)[source]

Return R12, T12, R21, T21 at an interface between lay1 and lay2.

mode_calcs.r_t_mat_anallo(an1, an2)[source]

Returns R12, T12, R21, T21 at an interface between thin films.

R12 is the reflection matrix from Anallo 1 off Anallo 2

The sign of elements in T12 and T21 is fixed to be positive, in the eyes of numpy.sign

mode_calcs.r_t_mat_tf_ns(an1, sim2)[source]

Returns R12, T12, R21, T21 at an1-sim2 interface.

Based on: Dossou et al., JOSA A, Vol. 29, Issue 5, pp. 817-831 (2012)

But we use Zw = 1/(Zcr X) instead of X, so that an1 does not have to be free space.