corner_analysis
- circuit_analyzer.all.corner_analysis(circuit_model, wavelengths, parallel=False, **kwargs)
Get the smatrix for a specific corner.
This runs a single simulation, but it can still be parallelized over the wavelength range. This is only useful if the circuit is very large and there are a lot of wavelength points.
This method allows to interpolate between corners. If the value of a fab parameter exceeds its corners, the closest corner to that value will be chosen.
Corners are described in a configuration file (yaml) + model file (py). Please check the samples for example configurations.
- Parameters:
- circuit_model: CircuitModel
IPKISS CircuitModel used in the simulation.
- wavelengths: array-like
An array of wavelengths, for instance: np.linspace(1.54, 1.56, 1001).
- parallel: bool, optional
If True, enables parallel computation over the wavelength range to potentially reduce the simulation time.
- **kwargs
Parameters dict used to specify the target corner for analysis. These keyword arguments should match the names of the fab parameters defined in the corner configuration.
- Returns:
- SMatrix1DSweep
The resulting 1D S-matrix as a function of wavelength.
Examples
>>> import circuit_analyzer.all as ca >>> with ca.setup('/path/to/configuration'): >>> S = ca.corner_analysis(circuit_model, wavelengths, s=1, t=-1, w=0)
You can also specify ‘min’, ‘nominal’, ‘max’ In this case, the first value in the list is chosen for min, the last one for max, and the default value for ‘nominal’.
>>> corner_analysis(circuit_model, wavelengths, s="max", t="min", w="nominal")