plot_s_matrix
plot_s_matrix( s_matrix: photonforge.SMatrix, input_ports: collections.abc.Sequence[str] = (), output_ports: collections.abc.Sequence[str] = (), x: Literal['wavelength', 'frequency'] | None = None, y: Literal['magnitude', 'phase', 'real', 'imag', 'dB'] = 'magnitude', threshold: float = 0.1,) -> tuple[typing.Any, typing.Any]Helper function to plot a component S matrix.
Args
- s_matrix: S parameters t be plotted.
- input_ports: Sequence of port names that will be used as input for plotting. If empty, all available ports are used.
- output_ports: Sequence of port names that will be used as output for plotting. If empty, all available ports are used.
- x: Value used for the x axis. One of “wavelength” or “frequency”. By default uses wavelengths for optics and frequency otherwise.
- y: Value to be plotted in the y axis. One of “magnitude”, “phase”, “real”, “imag”, or “dB”.
- threshold: Threshold value for the squared magnitude of the S parameter. Curves below this threshold are plotted separately or ignored (for phase plots).
Returns
fig, ax: Created matplotlib figure and axes.
Note
This function requires the module matplotlib.pyplot.