OptStrata module

This module contains MaxwellLayer and OptStrata classes. The physics model can be seen in Physics Model and Formulas: Optic tab

MaxwellLayer is a transfer matrix solver for 1D optical stabs, OptStrata is a wrapper of MaxwellLayer with material information coded.

OptStrata classes

class OptStrata.MaxwellLayer(wl, Ls=[1.0, 1.0], indices=[1.0, 1.0])

Class for layer structure for Maxwell solver using transfer matrix method

Parameters
  • wl (float) – Wavelength in vacuum to guide in the stratum

  • indices (list(complex)) – refractive indicies of the layers

  • Ls (list(float)) – Thickness of stratum, same unit as wl. The first and last elements are for top and substrate and is not used for calculation

boundModeTM(beta=None)

Solve for TM bounded mode near beta

Solve for TM bounded mode near beta (as first guess in root finding) with frequency \(\omega = c/\text{wl}\) on the stratum structure discribed with the thickness and index list; top/substrate defined by index0 and indexs. wl and Ls should be same unit

Parameters

beta (complex) – The effective refractive index traveling along z (initial guess)

Returns

complex – the effective refractive index for bounded mode

:raises Exception:: The solver doesn’t converge. Most likely a bounded mode doesn’t exist.

chiMTM(beta)

Modal-dispersion function for TM wave

Calculate the with modal-dispersion function for TM wave with frequency \(\omega = c/\text{wl}\) on the stratum structure described with the thickness and index list; top/substrate defined by index and index. wl and Ls should be same unit

Parameters

beta (complex) – The normalized wavenumber along z. \(k_z = 2\pi/\lambda*\beta\)

Returns

complex – The modal-dispersion function

confinementy(beta, ars, xs=None, Ey=None)

Return the confinement factor corresponds to mode with effective refractive index beta. Assuming active only couple to E_y filed. The active region is defined in ars. If xs and Ey is None, they will be generated.

Parameters
  • beta (complex) – The refractive index of the mode to calculate

  • ars (list(np.ndarray(bool))) – The list of active region for confinement factor

  • xs (np.ndarray) – The array for positions: controls the accuracy of the numerical integral for confinement facotr calculation

  • Ey (np.ndarray(complex)) – The field to integral on

populateIndices(xs)

Generate indices position array xs

Parameters

xs (np.ndarray) – The position coordinate to calculate field on

Returns

np.ndarray – refractive indices of the material at position xs

populateMode(beta, xs)

Generate TM modes (field) on position array xs

Generate TM modes (field) on position array xs, assuming beta is a bounded Mode (i.e. return value of boundModeTM()) return Ey, Hx, Ez, normalized to max(abs(Ey)) = 1; unit of Hx is \(([\text{nit of beta}]\times \sqrt{\mu_0/\epsilon_0})^-1\)

Parameters
  • beta (complex) – The effective refractive index traveling along z

  • xs (np.ndarray) – The position coordinate to calculate field on

Returns

  • np.ndarray – E field perpendicular to layers and propagation

  • np.ndarray – H field parallel to layers and perpendicular to propagation

  • np.ndarray – E field in propagation

transferTM(beta)

Tranfer matrix for TM wave

Calculate the transfer matrix for TM wave with frequency \(\omega = c/\text{wl}\) on the stratum structure described with the thickness and index list. wl and Ls should be same unit

Parameters

beta (complex) – The normalized wavenumber along z. \(k_z = 2\pi/\lambda *\beta\)

Returns

np.ndarray – A 2*2 matrix, the transfer matrix from substrate to top

class OptStrata.OptStrata(wl=3.0, materials=['Air', 'InP'], moleFracs=[0.0, 0.0], dopings=[0.0, 0.0], Ls=[1.0, 1.0], mobilities=None, cstmIndx={}, cstmPrd={}, cstmGain={})

Class for groups of stratum, a wrapper of MaxwellLayer with material parsing support

Parameters
  • wl (float) – Wavelength in vacuum to guide in the stratum

  • materials (list(str)) – Name of the material for each strata, with materials[0] being the top (usually air) and materials[-1] the substrate.

  • moleFracs (list(float)) – Mole fractions for each material. The number should be between 0 and 1. For strata that the parameter is not applicable, the number doesn’t influence the result.

  • dopings (list(float)) – The doping level in unit 1E17 cm^-3 for the material. For strata that the parameter is not applicable, the number doesn’t influence the result.

  • Ls (list(float)) – Thickness of stratum, same unit as wl. The first and last elements are for top and substrate and is not used for calculation

  • mobilities (None or list(float)) – Mobility influence the relaxation rate for plasmon resonance. When it’s None, it is assumed to have 1E13 s^1 relaxation.

  • cstmIdx (dict) – A dictionary of customized material, with key the name and value the complex refractive index

  • cstmPrd (dict) – A dictionary of customized material, with key the name and value a list of two elements, 0-th being the period length (float in unit Angstrom) and 1-st (int) being the nubmer of periods. If the 0-th value is 0 or not key not exists, it’s not a peirodic structure. The variable is only for book keeping and is not used to validate Ls within the class

  • cstmGain (dict) – A dictionary of customized material, with key the name and value the gain coefficient. The variable is only for book keeping and is not used for any calculation.

confinementy(beta, xs=None, Ey=None)

Return the confinement factor corresponds to mode with effective refractive index beta. If xs and Ey is None, they will be generated. The active region is labelled by anyting start with “Active”.

Parameters
  • beta (complex) – The refractive index of the mode to calculate

  • xs (np.ndarray) – The array for positions: controls the accuracy of the numerical integral for confinement facotr calculation

  • Ey (np.ndarray(complex)) – The field to integral on

delete(row)

Delete the strata indexed with row (top air and bottom substrate included)

indexOf(n)

Return the refractive of the strata indexed with n (top air and bottom substrate included). The result is a combination of linear interpolation of mole fraction and plasmonic loss by Drude model

insert(row, material=None, moleFrac=None, doping=None, L=None, mobility=None)

Insert a strata indexed with row (top air and bottom substrate included) with parameters listed

populateMtrl(xs, mtrlList=None)

Populate a boolean array for index slicing on xs for material in the mtrlList. If mtrlList is None, the active region is labelled by anyting start with “Active”.

Parameters
  • mtrlList (list(str) or tuple(str)) – name of materials to be labeled

  • xs (np.ndarray) – The position coordinate to label material

Returns

list(np.ndarray(bool)) – list of slicing indices to label materials

updateIndices()

Update indices information according to material info

Yields
  • indices (list(complex)) – complex refractive index of the stratum

  • index0 (complex) – Refractive index of the top (before Ls[0]) strata

  • indexs (complex) – refractive index of the substrate (after Ls[-1])

Example

Todo

Add examples