df_to_sdict
df_to_sdict#
- df_to_sdict(df: pandas.core.frame.DataFrame) Tuple[jax.Array, Dict[Tuple[str, str], jaxtyping.Complex[Array, '...']]] [source]#
Create an s-dictionary from a dataframe of s-parameters.
- Parameters
df (pandas.DataFrame) – A dataframe of s-parameters. Usually the output of
load_sparams
. Expected columns are ‘port_in’, ‘port_out’, ‘mode_in’, ‘mode_out’, ‘freq’ (in Hz), ‘mag’, and ‘phase’.- Returns
f (numpy.ndarray) – Array of frequencies (in Hz).
sdict (sax.SDict) – Dictionary of scattering parameters.
See also
load_sparams
Load s-parameters from a Lumerical .sparam file.