Metadata-Version: 2.4
Name: setupEM
Version: 0.21.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.13.0
Requires-Dist: gds_prepare_for_EM>=1.9.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: gdstk
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

# Highlights

The main new features of the last months, with the version that brought them:

- **Stackup Editor: overlapping materials (Priority), thermal conductivity lateral and vertical, limits for stackup variables, datatype per layer** (0.21.0)
- **setupThermal: heat flux, temperature gradient and heat flow per boundary** (0.20.0)
- **Port walls**: calibrated ports at the layout edge (0.18.0)
- **Split regions**: a large layout simulated in pieces and joined (0.18.0)
- **setupThermal with the KLayout plug-in's thermal export**: powers by instance name, temperature per device (0.17.0)
- **Edit \*.py model in place**: edit any gds2palace model script in the GUI (October 29)

Each dated section below lists the new features first, then changed behaviour, then fixes.

# What's New - November 23 to 29, 2026 (setupEM 0.20.0 and 0.21.0)

Needs gds2palace 0.13.0 or newer.

## New

**Stackup Editor: overlapping materials.** New optional Priority column on the Dielectric Stack and Layers tabs: where materials overlap, the higher Priority wins.

**Stackup Editor: different thermal conductivity lateral and vertical.** The **…** button in the Thermal Conductivity cell opens a dialog for a lateral and a vertical value. setupThermal's stackup preview shows both.

**Limits for stackup variables.** On the Variables tab, a variable can get a minimum and maximum or a list of allowed values, and a description. The override grid on the Input Files tab shows these limits, and offers a list as a dropdown.

**Stackup Editor: datatype per layer.** New optional Datatype column on the Layers tab: the GDS datatype a layer is read from, so that two layers can share one GDS layer number. The Input Files tab says which layers take their datatype from the stackup.

**Stackup preview: overlapping materials.** Two dielectrics that overlap with different Priority, e.g. mold compound over a die, now show their Priority in the preview, and their tooltips say which one keeps the overlap. The one that reaches higher is drawn above, and a layer in the overlap is drawn once instead of in both.

**Field viewer: arrow length.** The Scaled checkbox next to Show arrows is now a dropdown: **Fixed** (all arrows the same length, direction only; the new default), **Scaled** (length follows the field strength, as before) and **Log 2 / 3 / 4 decades** (log scale; weaker arrows are hidden). By default the arrows are smaller, and there are more of them. Command line: `--arrow-length fixed|scaled|log2|log3|log4`.

**setupThermal: heat flux and temperature gradient.** New checkbox on the Mesh tab, Result output: Heat flux and temperature gradient (needs gds2palace 0.13.0). The field viewer then shows `temperature flux` (W/m²) and `temperature grad` (K/m) as arrows, with their units in the legend.

**setupThermal: heat flow per boundary.** The results summary lists the heat that leaves the model through each constant-temperature boundary, in W and as a share of the input power (needs gds2palace 0.13.0). It shows where the heat goes, not whether the mesh is fine enough.

**Field viewer: clip at a layer.** For thermal results, right-click the Z clip slider for a list of the model's layers and pick the one to cut through. The position line names the layer the plane is in, e.g. "in TopMetal1 (50 %)".

## Fixes

- Field viewer: with the clip plane right next to a thin layer, the cut face showed triangular artefacts. A constant-temperature boundary on the backside could show as a hole in the model's bottom face.
- Saving a stackup no longer sets its format version back to an older one.
- Saving a stackup: a comment in the Layers section stays in front of its layer when the layers are sorted. Before, all comments moved to the top of the section.
- Saving a stackup: the comment about format 3.2 names the features the file uses, e.g. only the limits of variables. Before, it always named thermal conductivity per direction and Priority. The file now ends with a newline.
- Stackup layers with a Datatype: Simplify GDS now simplifies them, on their datatype only (before, they were left out without a message), and "Exclude layers" also takes layer/datatype, e.g. `68/20`. The layout preview counts their polygons for its large-layout warning and shows them as `68/20` in tooltips. Needs gds_prepare_for_EM 1.9.0.
- Bundled SG13G2 stackups: the same files as in gds2palace again (`total_thickness` has a minimum of 25 µm).
- setupThermal stackup preview: metals and vias with a temperature-dependent thermal conductivity table (e.g. Activ) are labelled κ=table, like dielectrics, instead of κ=0.0.
- setupThermal: two heat sources or boundaries on the same GDSII layer are now refused with a message that names the two rows. Before, the model was built with only one of them. Create Model also stops when a tab reports invalid input, instead of building the model from the part that could be read.
- setupThermal: the temperature per heat source (the table after a run and the temperatures CSV) now also works for models with prism elements instead of tetrahedra. Before, it showed no heat source temperatures for such a model.
- Thermal results: with the heat flux output on, the results summary and the field viewer could take `temperature flux` for the temperature.
- Field viewer: no more VTK deprecation warning in the console each time a result is loaded (VTK 9.6 and newer).

# What's New - November 22, 2026 (setupEM 0.19.1)

Needs gds2palace 0.12.0 or newer (`pip install` updates it).

## New

**Tube ports in the layout preview.** In gds2palace 0.12.0, a via port drawn as a box instead of a line is a tube port: the four side walls of the box as one port, for a port that stands for a real conductor such as a copper pillar. The layout preview draws it as four walls.

## Fixes

- Status line with Palace 0.19: it shows port and frequency progress again. With Palace 0.19 it stayed at "Port: n/a | Freq: ROM build" for the whole sweep.

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

---

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

- gds2palace>=0.13.0
- gds_prepare_for_EM>=1.9.0
- PySide6
- shiboken6
- scipy
- requests
- scikit-rf
- matplotlib
- numpy
- gdstk
- 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.)
