corner_analysis_all_combinations
- circuit_analyzer.all.corner_analysis_all_combinations(circuit_model, wavelengths, parallel=False)
Get the smatrix for all possible corner combinations.
To find which corners exist, this method looks through all the circuit models and collects all potential corners.
The resulting smatrices are stored in a dictionary, where the key refers to a combination of corners. For instance, with 3 corners ‘s’, ‘t’, and ‘w’. This will result in 3 × 3 × 3 = 27 unique simulations.
- 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
Parallelize the calculations to potentially reduce the simulation time.
- Returns:
- dict[tuple, SMatrix1DSweep]
A dictionary with smatrices for each of the corner combinations.
See also
Examples
>>> import circuit_analyzer.all as ca >>> cell = MZI() >>> cm = cell.CircuitModel() >>> >>> wavelengths = np.linspace(1.5, 1.6, 501)
>>> with ca.setup('/path/to/configuration'): >>> results = ca.corner_analysis_all_combinations( >>> circuit_model=cm, >>> wavelengths=wavelengths >>> )
If the circuit uses three corner parameters — for example: ‘s’, ‘t’, and ‘w’ — and each of them has three defined values: ‘min’, ‘nominal’, and ‘max’, then a total of 3 × 3 × 3 = 27 combinations will be simulated. If you print the results, you’ll see a dictionary where: Each key is a tuple of (parameter_name, corner) pairs indicating the specific corner combination. Each value is an instance of SMatrix1DSweep, which contains the simulation results for that combination.
{ # (27 in total) ( ('s', 'min'), ('t', 'min') ('w', 'min'), ): <ipkiss3.simulation.circuit.results.SMatrix1DSweep>, ... ( ('s', 'min'), ('t', 'nominal'), ('w', 'max'), ): <ipkiss3.simulation.circuit.results.SMatrix1DSweep>, ... ( ('s', 'max'), ('t', 'max'), ('w', 'max'), ): <ipkiss3.simulation.circuit.results.SMatrix1DSweep>, }