3.4.1. lekkersim.Structure
- class lekkersim.Structure(pin_list: List[Pin] = [], model: Model = None, solver: Solver = None, param_mapping: Dict[str, str] = None)
Class defining a single element of the photonic circuit
- Parameters:
pin_list (list) – list of str containing the names of the pins. Default is empty list
model (Model) – model object from which the structue may be derived. Defauls is none
solver (Solver) – solver object from which the structue may be derived. Defauls is none
param_mapping (dict) – dictionary of {oldname (str) : newname (str)} containning the mapping of the names of the parameters. Default is empty dict
- __init__(pin_list: List[Pin] = [], model: Model = None, solver: Solver = None, param_mapping: Dict[str, str] = None) None
Creator
Methods
__init__([pin_list, model, solver, ...])Creator
add_conn(pin, target, target_pin)Add connection between a self pin and a pin in another structure
add_pin(pin)Add pin to structure
createS()Creates the scattering matrix of the components
cut_connections(target)Remove all connection to target structure.
Recreates the scattering matrix as ndarray
get_in_from(st)Find pins of self with are connected from a target structure
get_model([pin_mapping, name])Retunrn model corresponding to structure
get_out_to(st)Find pins of self with are connected to a target structure
get_pin_basenames()Return the set of the basename of the pins
get_pin_modenames(target)Return list of mode names given a pin basename
get_pins([basename])Return list of the pins tuple
intermediate(st, pin_mapping)Used to generate the function for monitoring the modes between two structures
join(st)Join two structures to create the one cotaining the merged structure
Print the connection of this structure to other ones
Print the mappping between the pins and the entries of the scatterng matrix
Print all pins of the structures, divided in self pins and contained pins
raise_pins([pini, pino])Raises some pins of the structure into the solver
remove_connections(target)Remove all connection to target structure.
remove_pin(pin)Remove pin from structure
reset()Reset the mapping that keeps track of the solving
sel_input(pin_list)Divide pins to be connected providing inputs pins
sel_output(pin_list)Divide pins to be connected providing output pins
split_in_out([in_pins, out_pins])Created the scattering matrix object with left pins separated from right pins
update_params(param_dic)Updated the parametes dictionary of the represented optic componet
Attributes
Alllows the feeding of the sintax structure.pin['pin_name'] where the tuple of structure and pin is required
pin_countNumber of pins in a structure