1. Basic Syntax
This page provides an overview of the most used Methods and Classes in the GenSol package. This is by no meand a full API guide (which can be found here ), but just shows the most common Methods, grouped by functionality.
1.1. Circuit Definition
Classes and Methods for building a circuit:
Definition of Solver
|
Class Solver This class defines the simulations. |
Make the Solver the active solver |
Adding and connecting componets
|
Class Model |
|
Function for putting a model in a Solver object, and eventually specify connections |
|
Function for putting a Solver in another Solver object, and eventually specify connections |
|
Connect two structures in the active Solver |
Naming external pins
|
Class representing a pin in the circuit. |
|
Creates an pin in the solver and maps it to the given pin. |
Adding monitors
|
Add structure to the ones to be monitored for internal modes. |
|
Add structure to the ones to be monitored for internal modes |
Available Models
|
Model of attenuator in dB |
|
Model of variable ration beam splitter |
|
Simplified model of FPR circle mount |
|
Simplified model of FPR circle mount based on Gaussian beams. |
|
Model of Free Propagation Region. |
|
Model of attenuator in absolute unit |
|
Piecewise linear interpolator in N > 1 dimensions. |
|
Model of partially reflected Mirror |
|
Model of perfect mirror (only one port), 100% reflection |
|
Model of multimode variable phase shifter |
|
Model of a 2 modes polarization rotator |
Like partial, but keywords provided at creation cannot be overwritten al call time |
|
|
Model of multimode variable phase shifter |
Model of 1x2 Splitter |
|
|
Model of 1x2 Splitter with possible reflection between the 2 port side. |
|
Model of thermal phase shifter (dispersive waveguide + phase shifter) |
|
Template for a user defined waveguide |
|
Model of a simple waveguide |
1.2. Circuit Simulation
Methods for running the simulation:
|
Calculates the scattering matrix of the solver |
|
Solve active solver and returns the model |
1.3. Data Extraction
Calsses and Methods for extraction of the data after the simulation is run:
General Methods
|
Class for storing data of a solver mode. |
|
Function for returning the energy transmission between two ports |
|
Function for returning complex amplitude of the transmission between two ports |
|
Function for returning the phase of the transmission between two ports |
|
Returns the outputs from all ports of the model given the inputs amplitudes |
Methos for sweeps
|
Function for returning transmission data between two ports |
|
Function for getting the output do the system given the inputs |
Returns the scattering matrix for all the solved parametes in form of padas DataFrame |
Data from monitors
|
Function for returning data from monitors |
1.4. Export and import of models
|
Class for model from InPulse S-Matrix RAW DATA file |
|
Export scattering matrix in InPulse format |