meow.eme package

Contents

meow.eme package#

EME Implementations & Backends

Submodules#

SAX backend for EME (default backend)

compute_interface_s_matrix(modes1, modes2, conjugate=True, enforce_reciprocity=False, enforce_lossy_unitarity=False)[source]#

get the S-matrix of the interface between two `CrossSection`s

Parameters:
  • modes1 (List[Mode]) –

  • modes2 (List[Mode]) –

  • conjugate (bool) –

  • enforce_reciprocity (bool) –

  • enforce_lossy_unitarity (bool) –

compute_interface_s_matrices(modes, conjugate=True, enforce_reciprocity=False, enforce_lossy_unitarity=False)[source]#

get all the S-matrices of all the interfaces in a collection of CrossSections

Parameters:
  • modes (List[List[Mode]]) –

  • conjugate (bool) –

  • enforce_reciprocity (bool) –

  • enforce_lossy_unitarity (bool) –

compute_propagation_s_matrix(modes, cell_length)[source]#

get the propagation S-matrix of each Mode belonging to a CrossSection in a Cell with a certain length.

Parameters:
  • modes (List[Mode]) –

  • cell_length (float) –

compute_propagation_s_matrices(modes, cells=None, cell_lengths=None)[source]#

get all the propagation S-matrices of all the Modes belonging to each CrossSection

Parameters:
  • modes (List[List[Mode]]) –

  • cells (Optional[List[Cell]]) –

  • cell_lengths (Optional[List[float]]) –

select_ports(S, port_map, ports)[source]#

Keep subset of an S-matrix

Parameters:
  • S (ndarray[Any, dtype[float64]]) – the S-matrix to downselect from

  • port_map (Dict[str, int]) – a port name to s-matrix index mapping

  • ports (List[str]) – the port names to keep

Returns:

the downselected s-matrix and port map

Propagating fields throug devices

pi_pairs(propagations, interfaces, sax_backend)[source]#

generates the S-matrices of cells: a combination of propagation and interface matrix

l2r_matrices(pairs, identity, sax_backend)[source]#
r2l_matrices(pairs, sax_backend)[source]#
split_square_matrix(matrix, idx)[source]#
propagate(l2rs, r2ls, excitation_l, excitation_r)[source]#
compute_mode_amplitudes(u, v, m, excitation_l, excitation_r)[source]#
plot_fields(modes, cells, forwards, backwards, y, z, lim=1)[source]#
propagate_modes(modes, cells, ex_l, ex_r, y, z, sax_backend=None)[source]#

SAX backend for EME (default backend)

compute_s_matrix_sax(modes, cells=None, cell_lengths=None, sax_backend=None, conjugate=True, enforce_reciprocity=False, enforce_lossy_unitarity=False, **kwargs)[source]#

Calculate the S-matrix for given sets of modes, each set belonging to a Cell

Parameters:
  • modes (List[List[Mode]]) – Each collection of modes for each of the Cell objects

  • backend – which SAX backend to use to calculate the final S-matrix.

  • cells (Optional[List[Cell]]) –

  • cell_lengths (Optional[List[float]]) –

  • sax_backend (Optional[str]) –

  • conjugate (bool) –

  • enforce_reciprocity (bool) –

  • enforce_lossy_unitarity (bool) –