load_sparams#

load_sparams(filename: Union[pathlib.Path, str]) dict[source]#

Load S-parameters from a Lumerical “.sparam” or “.dat” file.

Parameters

filename (Path or str) – Path to the file.

Returns

header, data – Tuple, where the first item is the header information dictionary and the second item is a DataFrame with the s-parameters.

Return type

tuple of dict, pd.DataFrame

See also

df_to_sdict

Create an s-dictionary from a dataframe of s-parameters.

save_sparams

Exports scattering parameters to a “.sparam” file readable by interconnect.

Notes

Scattering parameters are returned in a DataFrame where the input and output ports, input and output modes, frequency, magnitude and phase, and sweep parameter columns (if applicable) are all present.

You can learn more about the Lumerical S-parameter file format here: https://optics.ansys.com/hc/en-us/articles/360036618513-S-parameter-file-formats