Metadata-Version: 2.4
Name: setupEM
Version: 0.15.0
Summary: Python tool for configuration of gds2palace workflow with GUI.
Author-email: Volker Muehlhaus <volker@muehlhaus.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/VolkerMuehlhaus/setupEM
Project-URL: Repository, https://github.com/VolkerMuehlhaus/setupEM
Project-URL: Changelog, https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gds2palace>=0.9.0
Requires-Dist: gds_prepare_for_EM>=1.6.0
Requires-Dist: PySide6
Requires-Dist: shiboken6
Requires-Dist: scipy
Requires-Dist: requests
Requires-Dist: scikit-rf
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: gdspy
Requires-Dist: meshio
Requires-Dist: pyvista
Requires-Dist: pyvistaqt
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# Python GUI for gds2palace 

![Intro](https://raw.githubusercontent.com/VolkerMuehlhaus/setupEM/main/doc/png/setupEM_banner.png)

## Install

    pip install setupEM

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

## Recent changes

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

# What's New - October 19, 2026

**Stackup Editor, ADS Momentum (*.ltd) import:** metals with an EXPAND thickness operation now make the dielectric next to them thicker, as in ADS, instead of reaching into the dielectric below. Before, a thick EXPAND DOWN metal (e.g. MET1/MET2 in a GaAs stackup) overlapped the layers underneath it, and a via could end up with zero height. Files where long lines are wrapped or END_... markers follow the last entry on the same line now import too; before, they failed with "No usable dielectric slabs".

Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md)

---

**Note:** the `setupEM` PyPI package itself requires:

- gds2palace>=0.9.0
- 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.)
