gplugins.sax.plot_model

Contents

gplugins.sax.plot_model#

gplugins.sax.plot_model(model: Callable[[...], Dict[Tuple[str, str], Complex[Array, '...']] | Tuple[Int[Array, 'dim'], Int[Array, 'dim'], Complex[Array, '...'], Dict[str, int]] | Tuple[Complex[Array, '...'], Dict[str, int]]], port1: str = 'o1', ports2: tuple[str, ...] | None = None, logscale: bool = True, fig=None, wavelength_start: float = 1.5, wavelength_stop: float = 1.6, wavelength_points: int = 2000, phase: bool = False) None[source]#

Plot Model Sparameters Magnitude.

Parameters:
  • model – function that returns SDict as function of wavelength.

  • port1 – input port name.

  • ports2 – list of ports.

  • logscale – plots in dB logarithmic scale.

  • wavelength_start – wavelength min (um).

  • wavelength_stop – wavelength max (um).

  • wavelength_points – number of wavelength steps.

  • phase – plot phase instead of magnitude.

import gplugins.sax as gs

gs.plot_model(gs.models.straight, phase=True, port1="o1")

(Source code, png, hires.png, pdf)

../_images/gplugins-sax-plot_model-1.png