SCEE Integration¶
These are the wrappers that provide an interface to enable use of all of the SCEE models in simphony photonic toolbox and Lumerical Interconnect. This gives the user multiple options (Interconnect or Simphony) to cascade devices into complex structures.
Interconnect Exporter¶
-
SiPANN.scee_int.
export_interconnect
(sparams, wavelength, filename, clear=True)¶ Exports scattering parameters to a file readable by interconnect.
Parameters: - sparams (ndarray) – Numpy array of size (N, d, d) where N is the number of frequency points and d the number of ports
- wavelength (ndarray) – Numpy array of wavelengths (in nm, like the rest of SCEE) of size (N)
- filename (string) – Location to save file
- clear (bool, optional) – If True, empties the file first. Defaults to True.
Simphony Wrapper¶
-
class
SiPANN.scee_int.
SimphonyWrapper
(model, sigmas={})¶ Class that wraps SCEE models for use in simphony.
Model passed into class CANNOT have varying geometries, as a device such as this can’t be cascaded properly.
Parameters: - model (DC) – Chosen compact model from
SiPANN.scee
module. Can be any model that inherits from the DC abstract class - sigmas (dict, optional) – Dictionary mapping parameters to sigma values for use in monte_carlo simulations. Note sigmas should be in values of nm. Defaults to an empty dictionary.
-
pins
= ('n1', 'n2', 'n3', 'n4')¶ The default pin names of the device
-
freq_range
= (182800279268292.0, 205337300000000.0)¶ The valid frequency range for this model.
-
s_parameters
(freq)¶ Get the s-parameters of SCEE Model.
Parameters: freq (np.ndarray) – A frequency array to calculate s-parameters over (in Hz). Returns: s – Returns the calculated s-parameter matrix. Return type: np.ndarray
-
monte_carlo_s_parameters
(freq)¶ Get the s-parameters of SCEE Model with slightly changed parameters.
Parameters: freq (np.ndarray) – A frequency array to calculate s-parameters over (in Hz). Returns: s – Returns the calculated s-parameter matrix. Return type: np.ndarray
-
regenerate_monte_carlo_parameters
()¶ Varies parameters based on passed in sigma dictionary.
Iterates through sigma dictionary to change each of those parameters, with the mean being the original values found in model.
-
connect
(component_or_pin: Union[Model, simphony.pins.Pin]) → simphony.models.Model¶ Connects the next available (unconnected) pin from this component to the component/pin passed in as the argument.
If a component is passed in, the first available pin from this component is connected to the first available pin from the other component.
-
disconnect
() → None¶ Disconnects this component from all other components.
-
static
from_file
(filename: str, *, formatter: Optional[simphony.formatters.ModelFormatter] = None) → simphony.models.Model¶ Creates a component from a file using the specified formatter.
Parameters: - filename – The filename to read from.
- formatter – The formatter instance to use.
-
static
from_string
(string: str, *, formatter: Optional[simphony.formatters.ModelFormatter] = None) → simphony.models.Model¶ Creates a component from a string using the specified formatter.
Parameters: - string – The string to load the component from.
- formatter – The formatter instance to use.
-
interface
(component: simphony.models.Model) → simphony.models.Model¶ Interfaces this component to the component passed in by connecting pins with the same names.
Only pins that have been renamed will be connected.
-
multiconnect
(*connections) → simphony.models.Model¶ Connects this component to the specified connections by looping through each connection and connecting it with the corresponding pin.
The first connection is connected to the first pin, the second connection to the second pin, etc. If the connection is set to None, that pin is skipped.
See the
connect
method for more information if the connection is a component or a pin.
-
rename_pins
(*names) → None¶ Renames the pins for this component.
The first pin is renamed to the first value passed in, the second pin is renamed to the second value, etc.
-
to_file
(filename: str, freqs: numpy.array, *, formatter: Optional[simphony.formatters.ModelFormatter] = None) → None¶ Writes this component’s scattering parameters to the specified file using the specified formatter.
Parameters: - filename – The name of the file to write to.
- freqs – The list of frequencies to save data for.
- formatter – The formatter instance to use.
-
to_string
(freqs: numpy.array, *, formatter: Optional[simphony.formatters.ModelFormatter] = None) → str¶ Returns this component’s scattering parameters as a formatted string.
Parameters: - freqs – The list of frequencies to save data for.
- formatter – The formatter instance to use.
- model (DC) – Chosen compact model from