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 5, 2026 (setupEM 0.17.0)

setupThermal works with the thermal export of the KLayout plug-in klayout_em_export (one heat source per transistor and resistor, with the schematic instance names from LVS in <layout>_thermalmap.json):

  • Load powers... below the Thermal Sources + Boundaries list sets the powers from a file of your circuit simulation, by instance name. Needs gds2palace with util_thermal_map.
  • The list names the device of each heat source (instance and pcell) and the region outline. Heat source layers above 299 count as present in the layout.
  • The export's placeholder boundary (constant temperature on the region outline, no target layer) is listed as "region outline: choose the target layer"; Create Model refuses a boundary without a target layer.
  • Temperature per device: after a run, the log lists the average and peak temperature of each heat source and their rise above the fixed temperature, and <model>_temperatures.csv next to the model script has the same per instance. Command line: python -m setupEM.thermal_results <model>.tsimcfg.

Changes:

  • Create Model also writes the settings file, <model>.simcfg / <model>.tsimcfg next to the model script (as Save Config would), so that a layout tool's next export keeps your settings and the KLayout plug-in finds the layout's stackup, datatypes and thermal objects. It overwrites only a settings file of the same application. Opening a .simcfg that Create Model wrote with a script continues that script without asking.
  • The Mesh tab's "Mesh refinement at metal edges" is now "Mesh size at heat sources", which is what it sets in a thermal model (metal edges are not refined there).

Fixes:

  • ElmerSolver no longer hangs at start on a Linux desktop where an X display does not accept connections ("Authorization required, but no authorization protocol specified"): setupThermal starts it with hwloc's OpenGL plug-in off (HWLOC_COMPONENTS=-gl, unless you set that variable).

What's New - October 31, 2026 (setupEM 0.16.0)

After a new export from the layout tool (setupEM): a layout tool such as the KLayout plug-in klayout_em_export writes the GDSII file and a .simcfg, and writes both again when the layout changes. The settings you made in setupEM since are only in your model script, because Create Model writes the script, not the .simcfg. setupEM now takes from such a .simcfg only the ports, GDSII file, stackup, cell and purpose, and keeps everything else as in the script:

  • Opening a .simcfg when a model script for the same GDSII file exists next to it asks whether to Continue with the script (edit it in place, ports and layout settings from the .simcfg) or Start from the config.
  • Loading a .simcfg while editing a script in place lists the ports and layout settings that differ and asks whether to Update the script from it or Open it as a new model. Before, loading it ended editing in place and replaced all settings.
  • While editing a script in place, the bar below the menu points out a newer .simcfg of the same GDSII file with other ports or layout settings, with Update from it.

Load Config, Import from *.py model and Edit *.py model in place start in the folder of the model you are working on (the config or script loaded last, else the GDSII file). Before, they started in the folder setupEM was launched from, e.g. KLayout's when the KLayout plug-in opened setupEM.

setupEM 0.16.0 needs gds2palace 0.9.3 or later: a layout with several shapes on one port layer (e.g. a transistor terminal on several fingers, from the KLayout plug-in) makes one port with several elements there; older gds2palace versions used only the last shape.

Fixes:

  • scripts/combine_extend_snp.py is the same as gds2palace's again. It had missed three fixes made there in September: the port impedance lookup for AMR iterations, the missing .sNp extension for a model name that contains a dot, and Touchstone output after an interrupted Palace run.
  • On Linux with GNOME (Wayland), the mouse cursor no longer keeps spinning for about 10 seconds after setupEM starts. setupEM briefly opened three invisible windows while building the Input Files tab, and GNOME waited for them to finish starting.
  • Via ports with direction -Z keep their from and to layers. Before, loading a .simcfg dropped them, and Create Model wrote such a port as an in-plane port.
  • An incomplete port (direction and layers that don't fit, e.g. from a .simcfg written by another tool) gives a warning in the Ports tab. Before, gds2palace exited and setupEM closed. A lowercase z counts as a via port too.
  • combine_extend_snp (Touchstone output after a Palace run) handles ports with several elements (several shapes on one port layer, gds2palace 0.9.3): one Z0 per port in the option line, and the elements' port inductances combined in parallel for de-embedding. Before, the last element overwrote the others.

What's New - October 29, 2026

File > Edit *.py model in place (new, setupEM and setupThermal): edits a gds2palace model script directly, e.g. one from the gds2palace MCP server, an example or your own code. Create Model and File > Save write only the values you change; the script's loops, comments and custom code stay. Settings the script computes itself are greyed out. A script that builds several models (a parameter sweep) lists them on the Create Model tab, and Start Simulation runs the ticked ones. After importing a script that setupEM didn't write, a bar below the menu offers Edit in place instead.

File > Import from *.py model now runs a gds2palace script to read it, without reading the GDSII file and without meshing. The run stops where the script builds the model, so its solver start never runs. The import now gets exactly what gds2palace would get, also values and ports the script computes. Before, ports made in a loop (as in many gds2palace MCP scripts) were left out, and the imported model was missing them. The script's own code before building the model does run, e.g. a script that generates its GDSII file writes it. If the run fails, the import reads the script text as before, and the bar below the menu says why.

File menu: the three Recent submenus are now one Open Recent submenu, with sections for configs, imported *.py models and *.py models edited in place. A file reopens the way it was opened. The menu is grouped as open, recent, save, preferences. Load Default Config and Save as Default Config are removed: defaults for new models are set in File > Preferences. An existing default.simcfg / default.tsimcfg in your home directory still opens with Load Config, and Save Config can write it.

Import and edit in place now read a stackup given as utilities.get_stackup_path("SG13G2_FEM_200um.xml"), the way the gds2palace MCP server writes it (needs gds2palace 0.9.1 or later). Before, an imported model using that syntax had no stackup file.

Full history: CHANGES.md


Note: the setupEM PyPI package itself requires:

  • gds2palace>=0.9.4
  • 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.17.0

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.17.0
File Size Uploaded Provenance Actions
setupem-0.17.0.tar.gz 414.2 kB Without provenance Details for setupem-0.17.0.tar.gz

Built distribution (wheel)

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

Total release size: 815.7 kB

Release files / setupem-0.17.0.tar.gz

Download URL setupem-0.17.0.tar.gz
Size 414.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f54284f8e48f1e6a74425467ea94d47b507f40a438a9219b70ae74b11981339
BLAKE2b-256 checksum
How to use checksums
91f26b0347694215e86e079606ca486cbae9b79d3ff9ce7174e3847421a0ad0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL setupem-0.17.0-py3-none-any.whl
Size 401.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca1bbbcfb3348cdbc76d05848db891cd8676799a5ff6a0f3759c0c2c4d32f160
BLAKE2b-256 checksum
How to use checksums
b6d94e099c1a33b17d83cc3aa5a21d2ba7ad9a86fa77f495036485b7ac394121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for setupEM 0.17.0

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.17.0 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