gplugins.meow.MEOW#
- class gplugins.meow.MEOW(component: Component, layer_stack, wavelength: float = 1.55, temperature: float = 25.0, num_modes: int = 4, cell_length: float = 0.5, spacing_x: float = 2.0, center_x: float | None = None, resolution_x: int = 100, spacing_y: float = 2.0, center_y: float | None = None, resolution_y: int = 100, material_to_color: dict[str, tuple[float, float, float]] = {'si': (0.9, 0, 0, 0.9), 'sin': (0.0, 0.9, 0.0, 0.9), 'sio2': (0.9, 0.9, 0.9, 0.9)}, dirpath: str | Path | None = PosixPath('/home/runner/.gdsfactory/sp'), filepath: str | Path | None = None, overwrite: bool = False)[source]#
- __init__(component: Component, layer_stack, wavelength: float = 1.55, temperature: float = 25.0, num_modes: int = 4, cell_length: float = 0.5, spacing_x: float = 2.0, center_x: float | None = None, resolution_x: int = 100, spacing_y: float = 2.0, center_y: float | None = None, resolution_y: int = 100, material_to_color: dict[str, tuple[float, float, float]] = {'si': (0.9, 0, 0, 0.9), 'sin': (0.0, 0.9, 0.0, 0.9), 'sio2': (0.9, 0.9, 0.9, 0.9)}, dirpath: str | Path | None = PosixPath('/home/runner/.gdsfactory/sp'), filepath: str | Path | None = None, overwrite: bool = False) None [source]#
Computes multimode 2-port S-parameters for a gdsfactory component.
assumes port 1 is at the left boundary and port 2 at the right boundary.
- Note coordinate systems:
gdsfactory uses x,y in the plane to represent components, with the layer_stack existing in z meow uses x,y to represent a cross-section, with propagation in the z-direction hence we have [x,y,z] <–> [y,z,x] for gdsfactory <–> meow
- Parameters:
component – gdsfactory component.
layer_stack – gdsfactory layer_stack.
wavelength – wavelength in microns (for FDE, and for material properties).
temperature – temperature in C (for material properties). Unused now.
num_modes – number of modes to compute for the eigenmode expansion.
cell_length – in un.
spacing_x – at beginning and end of the simulation region.
center_x – in um.
resolution_x – pixels in horizontal region.
spacing_y – at the beginning and end of simulation region.
center_y – in um.
resolution_y – pixels in vertical direction.
material_to_color – dict of materials colors for struct plot
dirpath – directory to store Sparameters.
filepath – to store pandas Dataframe with Sparameters in npz format. Defaults to dirpath/component_.npz.
overwrite – overwrites stored Sparameter npz results.
- Returns:
S-parameters in form o1@0,o2@0 at wavelength.
cross_section view: ________________________________ | | | | | spacing_x spacing_x | spacing_y |<---------> <-------->| | ___________ _ _ _ | | | | | | | |_ _ _ _ _ |_ center_y | | | | | |___________| | | | | | | | | | spacing_y | | |_______________|________________| center_x top side view: ________________________________ | | | | |cell_length | |<--------> | |_____________________ __________| | | | | | | | | | cell0 | cell1 | cell2 | |_________|___________|__________| | | | | | | | | |________________________________|
Methods
__init__
(component, layer_stack[, ...])Computes multimode 2-port S-parameters for a gdsfactory component.
add_global_layers
(component, layer_stack[, ...])Adds bbox polygons for global layers.
compute_all_modes
()compute_mode
(xs_num)compute_sparameters
()Returns Sparameters using EME.
create_cells
()Get meow cells from extruded component.
get_port_map
()gf_material_to_meow_material
([...])Converts a gdsfactory material into a MEOW material.
layer_stack_to_extrusion
()Convert LayerStack to meow extrusions.
plot_cross_section
(xs_num)plot_mode
(xs_num, mode_num)plot_s_params
([fmt])plot_structure
([scale])validate_component
(component)