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
- 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
- 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
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 (List[Cell] | None)
cell_lengths (List[float] | None)
sax_backend (str | None)
conjugate (bool)
enforce_reciprocity (bool)
enforce_lossy_unitarity (bool)