Creating cross section images
Vertical cross-section images of layouts can be created using the
XSection plugin for KLayout.
To use it, install the XSection plugin from KLayout -> Tools -> Manage packages
.
Note
XSection only works with the default KLayout setup, secondary environments are not yet supported.
KLayout GUI XSection tool
Once XSection plugin is installed in KLayout, a “XSection” ruler tool is available as a scroll option for the Ruler tool.
Use the Ruler tool in KLayout to choose the cuts along which the vertical cross-sections are created. Select the “XSection” ruler type if you want to use other rulers for measurements.
To create the cross-sections:
Tools -> XSection scripts -> Run script -> example.xs
XSection call in KQC code
XSection plugin can be called from python code to automate cross-section geometry generation for simulation files. klayout_package/python/kqcircuits/simulations/export/xsection/xsection_export.py includes
create_xsections_from_simulations
, a high level method to take a cross-section for each simulation object using twoDPoint
values
xsection_call
, a low level method requiring a path to the input and output OAS files, twoDPoint
values and, optionally, a path to a process file. If xsection/kqc_process.xs process file is used, make sure to provide a path to the parameters json file as well.
An example of using XSection tool to produce cross-section simulation files is demonstrated in klayout_package/python/scripts/simulations/waveguides_sim_xsection.py
Note
XSection 1.7 does not work with KQCircuits. If you have such version installed, please update to the newest release of XSection.
Process files (.xs)
The process by which the actual physical shapes are created from the layout
layers is defined in .xs
files. The xsection folder in KQC contains two
process files:
Lightweight example process file xsection/example.xs, intended for taking cross-sections using a KLayout GUI tool
xsection/kqc_process.xs intended only for use by a
create_xsections_from_simulations
call in KQC code
Information about writing the .xs
files can be found in the following pages: