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

What's New - October 21, 2026

Tools > Simplify GDS: the simplification code moved to gds_prepare_for_EM (module gds_simplify_for_em), where the gds2palace MCP server uses it too. setupEM now requires gds_prepare_for_EM 1.6.0 or later; pip install --upgrade setupEM updates it.

Fix: with Merge via arrays (and no fill removal or merging per layer), the simplified file still contained the original subcells as extra top-level cells. Without a cell name, gds2palace reads the first top-level cell, which could be one of them, e.g. a pad cell instead of the design. These left-over cells are now removed.

Full history: CHANGES.md


Note: the setupEM PyPI package itself requires:

  • gds2palace>=0.9.3
  • 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.16.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.16.0
File Size Uploaded Provenance Actions
setupem-0.16.0.tar.gz 397.6 kB Without provenance Details for setupem-0.16.0.tar.gz

Built distribution (wheel)

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

Total release size: 790.6 kB

Release files / setupem-0.16.0.tar.gz

Download URL setupem-0.16.0.tar.gz
Size 397.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2395766967b4ed69347539bb3056029fa2bfa5018b6a903c16b02fd3dd1e2bed
BLAKE2b-256 checksum
How to use checksums
64ae312b5bf88a761af5ae216c9603121db69e34676222452b308497f4f80487
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.16.0-py3-none-any.whl

Download URL setupem-0.16.0-py3-none-any.whl
Size 393.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23d1d43ac3f6145c62084da8099d172d31bb595ba94945836189c72e25aab121
BLAKE2b-256 checksum
How to use checksums
6cb202a3d9978d8e4c0ed73be80a666e4ad2ccad2b4c8dbdc8f2c089840ee73b
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.16.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.16.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