Metadata-Version: 2.4
Name: setupEM
Version: 0.12.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.8.0
Requires-Dist: gds_prepare_for_EM>=1.3.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
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 7, 2026

**Layout Preview:** the bottom bar now shows the live cursor position (X/Y in um, GDS orientation). Press **M** to measure distances: click the start point, move the mouse to see the live distance, dx and dy, click the end point to fix it. The next click starts a new measurement, **M** or **Esc** leaves measure mode. Dragging still pans while measuring. The mouse pointer is now an arrow (a crosshair in measure mode) instead of a hand while no button is pressed, so the position is easier to identify.

**3D Field Viewer:** new **Scaled** checkbox next to **Show arrows**. When on, arrow length and color follow the field value, using the same colormap, linear or log scale, and Min/Max (or dB Range) as the legend. Arrows below the lower limit are hidden; the smallest visible arrow is never shorter than 15% of the longest. The arrow color swatch is not used while Scaled is on. The command line field viewer has a matching `--arrows-scaled` option.

# What's New - October 5, 2026

**Import Model** (*.py) with several GDS purposes (datatypes), e.g. `settings['purpose'] = [0, 35, 4]`, now works: the purpose field shows "0, 35, 4" and the model uses all three. Before, the field showed "(0, 35, 4)" and no datatype matched, so the layout preview and the model had no polygons on any layer. Models with a single purpose were not affected. A single number in the script (`settings['purpose'] = 0`) is now also read as `[0]`.

# What's New - October 2, 2026

**3D Field Viewer:** with **Log color scale**, a **Range** dropdown (-10, -20 ... -70 dB below Max) replaces the Min field; the default is -70 dB. dB means 20·log10 for E and B fields and 10·log10 for power-like arrays such as S or the energy densities. Switching to another result file or cycle now keeps the selected field (if the new data has it; a field you picked comes back as soon as it is available again) and keeps the camera view, zoom and clip position if the new mesh has the same bounding box, e.g. another AMR iteration or the matching "boundary" file. Only a file with different bounds resets the view.

**Tools > Simplify GDS...** has a new step **Merge via arrays** (default off), with a merge distance (default: the via array merge distance from Preferences). Vias closer than this distance are merged into one shape, but only if they connect the same metal shapes above and below, so merging never shorts different metal shapes. The via layers and the metal layers above and below them come from the loaded XML stackup. Vias without metal above or below are kept unchanged. Merged vias in the file are treated as solid metal in the model: fill factor correction needs the original vias, which are then no longer in the file. For accurate via resistance, merge vias in the model instead (via array merge distance > 0 with fill factor correction). gds2palace prints a note when fill factor correction is on and the vias in the file seem to be merged already. Requires gds_prepare_for_EM v1.3.0 or later.

The via array merging of the models themselves (gds2palace `merge_polygon_size`) no longer shorts different metal shapes either, with gds2palace v0.8.1 or later.

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

---

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

- gds2palace>=0.8.0
- gds_prepare_for_EM>=1.3.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.)
