kqcircuits.simulations.export.cross_section.cross_section_export
- kqcircuits.simulations.export.cross_section.cross_section_export.create_cross_sections_from_simulations(simulations: list[~kqcircuits.simulations.simulation.Simulation], cuts: tuple[~klayout.pyacore.DPoint, ~klayout.pyacore.DPoint] | list[tuple[~klayout.pyacore.DPoint, ~klayout.pyacore.DPoint]], ma_permittivity: float = 0, ms_permittivity: float = 0, sa_permittivity: float = 0, ma_thickness: float = 0, ms_thickness: float = 0, sa_thickness: float = 0, vertical_cull: tuple[float, float] | None = None, mer_box: ~klayout.pyacore.DBox | list[~klayout.pyacore.DBox] | None = None, magnification_order: int = 0, layout: ~klayout.pyacore.Layout | None = None, sim_class: type[~kqcircuits.simulations.export.cross_section.cut_simulation.CutSimulation] = <class 'kqcircuits.simulations.export.cross_section.cut_simulation.CutSimulation'>, **kwargs) list[CutSimulation] [source]
Create cross-sections of all simulation geometries in the list. Will set ‘box’ and ‘cell’ parameters according to the produced cross-section geometry data.
- Parameters:
simulations – List of Simulation objects, usually produced by a sweep
cuts –
A tuple (p1, p2), where p1 and p2 are endpoints of a cross-section cut or
a list of such tuples such that each Simulation object gets an individual cut
ma_permittivity – Permittivity of metal–vacuum (air) interface
ms_permittivity – Permittivity of metal–substrate interface
sa_permittivity – Permittivity of substrate–vacuum (air) interface
ma_thickness – Thickness of metal–vacuum (air) interface
ms_thickness – Thickness of metal–substrate interface
sa_thickness – Thickness of substrate–vacuum (air) interface
vertical_cull – Tuple of two y-coordinates, will cull all geometry not in-between the y-coordinates. None by default, which means all geometry is retained.
mer_box – If set as pya.DBox, will create a specified box as metal edge region, meaning that the geometry inside the region are separated into different layers with ‘_mer’ suffix
magnification_order – Increase magnification of simulation geometry to accomodate more precise spacial units. 0 = no magnification with 1e-3 dbu 1 = 10x magnification with 1e-4 dbu 2 = 100x magnification with 1e-5 dbu etc Consider setting non-zero value when using oxide layers with < 1e-3 layer thickness
layout – predefined layout for the cross-section simulation. If not set, will create new layout.
sim_class – CutSimulation or its subclass used for processing the cross-section layers
kwargs – Additional arguments passed to sim_class
- Returns:
List of XSectionSimulation objects for each Simulation object in simulations
- kqcircuits.simulations.export.cross_section.cross_section_export.visualise_cross_section_cut_on_original_layout(simulations: list[Simulation], cuts: tuple[DPoint, DPoint] | list[tuple[DPoint, DPoint]], cut_label: str = 'cut', width_ratio: float = 0.0) None [source]
Visualise requested cross section cuts on the original simulation layout.
Will add a rectangle between two points of the cut, and two text points into layer “cross_section_cut”:
* f"{cut_label}_1" representing the left side of the cross section simulation * f"{cut_label}_2" representing the right side of the cross section simulation
In case the export takes cross sections for one simulation multiple times, this function can be called on same simulation sweep multiple times so that multiple cuts can be visualised in the same layout. In such case it is recommended to differentiate the cuts using cut_label.
- Parameters:
simulations – list of simulations from which cross sections are taken. After this call these simulations will be modified to include the visualised cuts.
cuts –
A tuple (p1, p2), where p1 and p2 are endpoints of a cross-section cut or
a list of such tuples such that each Simulation object gets an individual cut
cut_label – prefix of the two text points shown for the cut
width_ratio – rectangles visualising cuts will have a width of length of the cut multiplied by width_ratio. By default will set 0 width line, which is visualised in KLayout.
