Skip to main content

Python GUI for gds2palace

Intro

Install

pip install setupEM

Full documentation, installation guide, and usage walkthrough: https://github.com/VolkerMuehlhaus/setupEM

Recent changes

What's New - November 13, 2026 (setupEM 0.18.2)

Ports and thermal objects: Return in a text field of the form (source layer, Z0, voltage; in setupThermal layer, power, temperature) applies the settings to the selected row, like the Apply button. With no row selected, the status bar says so.

Command line fixes (from issue #52):

  • A script from File > Export runs without a display: gds2palace 0.10.4 and newer builds the model without the gmsh window on Linux with no display (ssh, container, batch job). Before, the script stopped with "Can't open display". The exported script also has the switch as a comment, # settings['no_gui'] = True, for unattended runs where a display exists.
  • combine_extend_snp.py (combine_snp, in scripts/) has --help and --version, and takes the folder to search as an optional argument. Before, any option was ignored and the conversion ran. Same file as in gds2palace 0.10.4.

Scripts used on two machines (e.g. Windows and Linux):

  • A model script edited in place whose GDS file was taken from its folder on opening (the script had the other machine's path, e.g. /mnt/pub/... for P:/...) now gets that path when it is saved or the model is created; the Code tab shows it. Before, the GUI showed the new path and the script kept the old one, and the model was made from the old one.
  • On Linux, a path with a drive letter from Windows (D:/...) in a script or settings file is no longer taken as relative to the script's folder (/mnt/.../D:/..., "Load a GDSII file and XML stackup first"). A stackup that is not found, also not next to the script, is taken from the stackups that ship with gds2palace if one has that name; the log says so.

What's New - November 11, 2026 (setupEM 0.18.1)

Command line fixes (from issue #52, use without a display):

  • --help, --version and a wrong argument of setupEM, setupThermal, stackupEditor, resultViewer and fieldViewer no longer need a display: the arguments are read before Qt starts. All five have --version now.
  • setupEM -simcfg <file> opens a settings file of an Elmer model in Elmer mode. It opened in Palace mode unless --elmer was given, also when started from the KLayout plug-in.
  • A -simcfg, -gdsfile or -xmlfile that does not exist, or a settings file of the other application, ends setupEM / setupThermal with a message on stderr and exit code 2 instead of an empty window. In the GUI, a settings file that is gone is reported as "File not found", not as "Unknown data format".
  • Loading a settings file no longer shows a "Loaded" box: the log says "Config loaded from ...", with a GDS or stackup file that was not found at its saved path and was taken from the settings file's folder instead.
  • Opening a .simcfg continues with the model script only when the file is linked to it, and asks only when the two have other settings (the question lists them). Create Model links: besides <model>.simcfg it writes the script's name ("model_script") into the .simcfg the model was opened from, e.g. the KLayout plug-in's export, which keeps it on the next export. A script that only reads the same GDSII file is no longer taken for the model; the log names it. New options --continue-with-script and --start-from-config answer the question on the command line.
  • fieldViewer --screenshot needs no display and no QT_QPA_PLATFORM=offscreen.
  • python -m setupEM.join_pieces and python -m setupEM.thermal_results have --help and --version, write their errors to stderr, and a missing file is a message, not a traceback.
  • The modules without a GUI (join_pieces, thermal_results, script_model, ...) can be imported without loading Qt.
  • User guide: Model Fit starts snp2le with the result file loaded (the text said it has to be loaded by hand).

**Split regions, fix:**a side of the region made a port wall in setupEM after the export (e.g. with via ports of the layout on the region's edge) was a plain PEC wall in every piece and in the full check model: the wall shorted those ports, and the joined result and the full model were both wrong, in the same way. The pieces' port walls on the region's edge are now found from the ports on the edge of each piece's layout; the full model has all of the region's port walls. Where the region has a port wall but a piece none of its ports, that stretch stays PEC and now moves outward with the region's port wall extension (a length; written as settings['wall_extension'], needs gds2palace 0.10.1), so that all pieces and the full model have the same box.

What's New - November 10, 2026 (setupEM 0.18.0)

De-embedded results shown: View S-Parameters lists the _deembedded files from the start and opens with the raw result and its _deembedded result together. Model Fit fits the calibrated result (_dc_deembedded, else _deembedded) of a model with port walls or a moved reference plane; the raw result still holds the uncalibrated gap ports.

Port wall fixes: a model script edited in place now gives back its port wall extension, reference plane shift and de-embedding length (they were written but not read, so the next session started with 0). Two port walls no longer make 0 the default oversize and air (the other sides became overrides and the default fields changed nothing); a default field that sets no side any more is greyed out. The status line under the log names the solve of a port wall run (calibration standard k/n, reused, or the model). The Port walls status says OK or the warnings only; the layout preview draws an extended feed and its length, a symbol per box side, and labels without the side names.

Split regions: a .simcfg from the KLayout plug-in's Export All of a split region (several EM region boxes) opens as a set of pieces. The Models list shows the pieces (and an unticked full check model). The settings (frequencies, mesh, solver, boundaries) are those of the whole region, shared by all pieces; a piece's box sides follow from the region's (a cut is a port wall, a stretch of a port wall without the piece's ports is PEC at the layout edge) and are locked; a piece can have its own mesh settings (Mesh tab, "Own mesh settings for p2"). Start Simulation runs the pieces without a gmsh window and does not mesh a piece again whose mesh is current; View S-Parameters shows the joined result first, and Model Fit fits it. The port wall extension and reference plane shift are the region's, on its outer sides only (none on a cut). An export written on another machine opens with its model folders, layouts and stackup found here. Start Simulation creates and runs the ticked pieces one after another and joins their results at the cuts (join_pieces.py, also python -m setupEM.join_pieces <name>.simcfg) into <name>_deembedded.sNp of the whole region. A piece whose layout fingerprint, settings and gds2palace version are unchanged since its last run is reused (piece.key in its model folder); Run unchanged pieces too overrides. Create Model keeps a settings file's own keys of the layout tool (piece name, fingerprint) when it rewrites the file.

The calibration standards of a port wall are no longer listed as models of their own in Models on the Create Model tab (they share the model's _data folder and its run_sim solves them before the model); Start Simulation ran run_sim once per listed row, and Preview stopped after the first standard with the model itself unbuilt. For a script that creates several models, the question about results of a previous simulation is now asked once before the first model starts, not between two models.

Port walls: calibrated ports at the layout edge (needs gds2palace 0.10.0). Mesh and Boundaries > Advanced... offers Port wall for xmin, xmax, ymin and ymax: PEC at the layout edge, oversize and air 0 and locked, written as 'PORTWALL' in settings['boundary']. The Ports tab gets a De-embedding column (calibrated at a port wall, or the estimated port inductance), locks the direction of ports on a port wall, and a Port walls group with Check port walls (reads the layout, no meshing): per port wall its ports, ground at the cut, D, the standards' lengths, the valid frequency range, warnings or the error, and the Reference plane shift (settings['reference_plane_shift']). A port on an edge that is not a port wall gets the question whether to make that side one. Create Model runs the check when a port wall is set and stops on an error. An Extension (µm) per port wall (auto or a length, settings['port_wall_extension']) moves the port wall outward. The Ports tab runs the check by itself when a port wall has no result yet; the panel splits with the port list by a divider; warnings show with an icon and the start of their text. The layout preview shows the reference plane, where the uniform feed ends, and an extension, and fits the view to the layout and its box. setupEM and setupThermal keep the window's size and position (and the Ports tab's divider) from one session to the next. A via port on a port wall is listed as "via port used as a gap port on

The dielectric oversize can be set per side (xmin, xmax, ymin, ymax): in setupEM with Advanced... next to Boundary conditions, in setupThermal with Advanced... next to the oversize. It is written to the model script as a list settings['margin'] = [xmin, xmax, ymin, ymax], and read from there and from settings files. Needs gds2palace 0.10.0. A negative oversize is no longer accepted.

Bundled IHP stackups (from gds2palace 0.10.0): heat source target layers HEAT_TRANSISTOR and HEAT_RESISTOR, for thermal models. Nothing is drawn on them, so EM models are unchanged.

Full history: CHANGES.md


Note: the setupEM PyPI package itself requires:

  • gds2palace>=0.10.1
  • gds_prepare_for_EM>=1.6.0
  • PySide6
  • shiboken6
  • scipy
  • requests
  • scikit-rf
  • matplotlib
  • numpy
  • gdspy
  • meshio
  • pyvista
  • pyvistaqt

(Other Python modules mentioned above are only needed to run standalone helper scripts in this repository, not to use the installed package.)

Metadata

Release files for setupEM 0.18.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for setupEM 0.18.2
File Size Uploaded Provenance Actions
setupem-0.18.2.tar.gz 485.5 kB Without provenance Details for setupem-0.18.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for setupEM 0.18.2
File Interpreter ABI Platform Actions
setupem-0.18.2-py3-none-any.whl Python 3 none any Details for setupem-0.18.2-py3-none-any.whl

Total release size: 932.8 kB

Release files / setupem-0.18.2.tar.gz

Download URL setupem-0.18.2.tar.gz
Size 485.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b0f75f57ee4bea444579e9c2885061d2f55f31bce5afe5e5f13544b743e07ffc
BLAKE2b-256 checksum
How to use checksums
1265895688fb436be64b27e96f25e301f4ba7fdb801015f470714770fc24d91c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release files / setupem-0.18.2-py3-none-any.whl

Download URL setupem-0.18.2-py3-none-any.whl
Size 447.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db3cd19a65302fd87c23da92bfef914082007cb196efc0253c91b70f09a2881c
BLAKE2b-256 checksum
How to use checksums
f8176b485b7db565ac224a1c2a79b3824c3e0fd69e694654f83c4db691b53b32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Security for setupEM 0.18.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.18.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page