setupEM 0.19.0__tar.gz → 0.19.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. {setupem-0.19.0/src/setupEM.egg-info → setupem-0.19.1}/PKG-INFO +11 -17
  2. {setupem-0.19.0 → setupem-0.19.1}/README_pypi.md +9 -15
  3. {setupem-0.19.0 → setupem-0.19.1}/pyproject.toml +1 -1
  4. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/__init__.py +1 -1
  5. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/layout_preview.py +47 -24
  6. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/setupEM.py +57 -32
  7. {setupem-0.19.0 → setupem-0.19.1/src/setupEM.egg-info}/PKG-INFO +11 -17
  8. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM.egg-info/SOURCES.txt +1 -0
  9. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM.egg-info/requires.txt +1 -1
  10. setupem-0.19.1/tests/test_status_line.py +117 -0
  11. {setupem-0.19.0 → setupem-0.19.1}/LICENSE +0 -0
  12. {setupem-0.19.0 → setupem-0.19.1}/README.md +0 -0
  13. {setupem-0.19.0 → setupem-0.19.1}/setup.cfg +0 -0
  14. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/__main__.py +0 -0
  15. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/cli_common.py +0 -0
  16. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/config_update.py +0 -0
  17. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/data/SG13CMOS5L_200um.xml +0 -0
  18. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/data/SG13G2_100um.xml +0 -0
  19. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/data/SG13G2_200um.xml +0 -0
  20. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/data/SG13G2_FEM_200um.xml +0 -0
  21. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/data/SG13G2_FEM_200um_passi3D.xml +0 -0
  22. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/data/SG13G2_nosub.xml +0 -0
  23. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/field_viewer.py +0 -0
  24. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/gds_hierarchy_scan.py +0 -0
  25. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/join_pieces.py +0 -0
  26. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/momentum_import.py +0 -0
  27. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/palace_results.py +0 -0
  28. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/piece_set.py +0 -0
  29. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/result_viewer.py +0 -0
  30. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/run_with_overrides.py +0 -0
  31. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/script_model.py +0 -0
  32. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/script_probe.py +0 -0
  33. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/script_writer.py +0 -0
  34. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/setupThermal.py +0 -0
  35. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/setup_common.py +0 -0
  36. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/simplify_gds.py +0 -0
  37. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/stackupEditor.py +0 -0
  38. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/stackup_writer.py +0 -0
  39. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM/thermal_results.py +0 -0
  40. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM.egg-info/dependency_links.txt +0 -0
  41. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM.egg-info/entry_points.txt +0 -0
  42. {setupem-0.19.0 → setupem-0.19.1}/src/setupEM.egg-info/top_level.txt +0 -0
  43. {setupem-0.19.0 → setupem-0.19.1}/tests/test_cellname_default.py +0 -0
  44. {setupem-0.19.0 → setupem-0.19.1}/tests/test_cli_startup.py +0 -0
  45. {setupem-0.19.0 → setupem-0.19.1}/tests/test_config_update.py +0 -0
  46. {setupem-0.19.0 → setupem-0.19.1}/tests/test_config_update_gui.py +0 -0
  47. {setupem-0.19.0 → setupem-0.19.1}/tests/test_deembedded_view.py +0 -0
  48. {setupem-0.19.0 → setupem-0.19.1}/tests/test_export_no_gui.py +0 -0
  49. {setupem-0.19.0 → setupem-0.19.1}/tests/test_join_pieces.py +0 -0
  50. {setupem-0.19.0 → setupem-0.19.1}/tests/test_margin_per_side.py +0 -0
  51. {setupem-0.19.0 → setupem-0.19.1}/tests/test_piece_set.py +0 -0
  52. {setupem-0.19.0 → setupem-0.19.1}/tests/test_port_walls.py +0 -0
  53. {setupem-0.19.0 → setupem-0.19.1}/tests/test_qt_platform_noise.py +0 -0
  54. {setupem-0.19.0 → setupem-0.19.1}/tests/test_return_applies.py +0 -0
  55. {setupem-0.19.0 → setupem-0.19.1}/tests/test_run_with_overrides.py +0 -0
  56. {setupem-0.19.0 → setupem-0.19.1}/tests/test_save_current_file.py +0 -0
  57. {setupem-0.19.0 → setupem-0.19.1}/tests/test_script_model.py +0 -0
  58. {setupem-0.19.0 → setupem-0.19.1}/tests/test_script_probe.py +0 -0
  59. {setupem-0.19.0 → setupem-0.19.1}/tests/test_script_writer.py +0 -0
  60. {setupem-0.19.0 → setupem-0.19.1}/tests/test_table_rows.py +0 -0
  61. {setupem-0.19.0 → setupem-0.19.1}/tests/test_thermal_powers.py +0 -0
  62. {setupem-0.19.0 → setupem-0.19.1}/tests/test_thermal_results.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setupEM
3
- Version: 0.19.0
3
+ Version: 0.19.1
4
4
  Summary: Python tool for configuration of gds2palace workflow with GUI.
5
5
  Author-email: Volker Muehlhaus <volker@muehlhaus.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -10,7 +10,7 @@ Project-URL: Changelog, https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc
10
10
  Requires-Python: >=3.9
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: gds2palace>=0.11.0
13
+ Requires-Dist: gds2palace>=0.12.0
14
14
  Requires-Dist: gds_prepare_for_EM>=1.8.0
15
15
  Requires-Dist: PySide6
16
16
  Requires-Dist: shiboken6
@@ -40,6 +40,14 @@ https://github.com/VolkerMuehlhaus/setupEM
40
40
 
41
41
  ## Recent changes
42
42
 
43
+ # What's New - November 22, 2026 (setupEM 0.19.1)
44
+
45
+ Needs gds2palace 0.12.0 or newer (`pip install` updates it).
46
+
47
+ **Tube ports in the layout preview.** gds2palace 0.12.0 builds a via port shape drawn with an area (short side more than 10 % of the long side) as a tube port: the four side walls of the shape's bounding box, as one port. This is meant for a port that stands for a real conductor, e.g. a copper pillar between two chips that are simulated as two separate models (example `more_examples/chiplet_split_at_pillars` in the gds2palace repository). The layout preview draws such a port as its four walls. Via ports drawn as lines are shown as one sheet, as before.
48
+
49
+ **Status line with Palace 0.19.** Palace 0.19 writes the progress of the adaptive frequency sweep in a new form, and the status line stayed at "Port: n/a | Freq: ROM build" for the whole sweep. It now shows port and frequency progress with Palace 0.19 as with older versions, and a model with one excitation shows "Port 1/1". After a run with adaptive mesh refinement, the AMR iteration no longer drops back by one at the end (e.g. from 2/2 to 1/2).
50
+
43
51
  # What's New - November 19, 2026 (setupEM 0.19.0)
44
52
 
45
53
  Needs gds2palace 0.11 and gds_prepare_for_EM 1.8 or newer (`pip install` updates them). setupEM, gds2palace and gds_prepare_for_EM read layouts with gdstk now instead of gdspy, which is no longer maintained (its polygon fracturing could hang); gdspy is no longer installed with setupEM.
@@ -54,27 +62,13 @@ Needs gds2palace 0.11 and gds_prepare_for_EM 1.8 or newer (`pip install` updates
54
62
  - Ctrl+S saves into the `.simcfg` / `.tsimcfg` the model was opened from (the menu names it). Its other entries, e.g. the plug-in's link to the model script, are kept. A script edited in place and a piece of a split region are saved as before; a new model asks for a file name.
55
63
  - Closing setupEM, opening another file or File > New asks "Save the changes to ...?" when the settings changed since the file was opened or saved.
56
64
 
57
- # What's New - November 15, 2026 (setupEM 0.18.3)
58
-
59
- Needs gds2palace 0.10.7 or newer (`pip install` updates it).
60
-
61
- **`combine_extend_snp.py` 1.5** (`combine_snp`, in `scripts/`), the same file as in gds2palace 0.10.7:
62
- - The `_dc` Touchstone file keeps all simulated frequency points and adds only the 0 Hz point in front. Before, a result with the two low frequency points of a sweep from 0 Hz was resampled to a uniform frequency grid, so the simulated points, among them the two low ones, were replaced by interpolated values. The 0 Hz value itself is unchanged.
63
- - Port walls (from gds2palace 0.10.6): the line resistance of the standards is taken from the model's lowest frequency, so R and Q of models with port walls are right also below fstop/20.
64
-
65
- **Sweep from 0 Hz, the frequencies that replace DC** (a gds2palace 0.10.7 change, nothing to set in setupEM): with start frequency 0, gds2palace simulates two low frequency points instead of 0 Hz. These were always 10 MHz and 20 MHz. With a mesh finer than 0.5 µm (refined cellsize or a per-layer override), gds2palace 0.10.7 moves them up, to 5 MHz·µm divided by the smallest cell size and twice that (e.g. 25 and 50 MHz at 0.2 µm), because on such a fine mesh Palace could stop with "SuperLUSolver: Found a singular matrix" at 10 MHz. Models with cell sizes of 0.5 µm and more keep 10 and 20 MHz. The user's guide section on DC handling says this now.
66
-
67
- **Citation:** `CITATION.cff` and a "How to cite" section in the README; GitHub's **Cite this repository** button gives APA and BibTeX entries.
68
-
69
- **Internal:** the model script writer of setupEM and setupThermal is now a module without Qt (`script_writer.py`, issue #52). The written scripts are unchanged; `tests/test_script_writer.py` checks 8 recorded scripts against both the GUI and the writer.
70
-
71
65
  Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md)
72
66
 
73
67
  ---
74
68
 
75
69
  **Note:** the `setupEM` PyPI package itself requires:
76
70
 
77
- - gds2palace>=0.11.0
71
+ - gds2palace>=0.12.0
78
72
  - gds_prepare_for_EM>=1.8.0
79
73
  - PySide6
80
74
  - shiboken6
@@ -11,6 +11,14 @@ https://github.com/VolkerMuehlhaus/setupEM
11
11
 
12
12
  ## Recent changes
13
13
 
14
+ # What's New - November 22, 2026 (setupEM 0.19.1)
15
+
16
+ Needs gds2palace 0.12.0 or newer (`pip install` updates it).
17
+
18
+ **Tube ports in the layout preview.** gds2palace 0.12.0 builds a via port shape drawn with an area (short side more than 10 % of the long side) as a tube port: the four side walls of the shape's bounding box, as one port. This is meant for a port that stands for a real conductor, e.g. a copper pillar between two chips that are simulated as two separate models (example `more_examples/chiplet_split_at_pillars` in the gds2palace repository). The layout preview draws such a port as its four walls. Via ports drawn as lines are shown as one sheet, as before.
19
+
20
+ **Status line with Palace 0.19.** Palace 0.19 writes the progress of the adaptive frequency sweep in a new form, and the status line stayed at "Port: n/a | Freq: ROM build" for the whole sweep. It now shows port and frequency progress with Palace 0.19 as with older versions, and a model with one excitation shows "Port 1/1". After a run with adaptive mesh refinement, the AMR iteration no longer drops back by one at the end (e.g. from 2/2 to 1/2).
21
+
14
22
  # What's New - November 19, 2026 (setupEM 0.19.0)
15
23
 
16
24
  Needs gds2palace 0.11 and gds_prepare_for_EM 1.8 or newer (`pip install` updates them). setupEM, gds2palace and gds_prepare_for_EM read layouts with gdstk now instead of gdspy, which is no longer maintained (its polygon fracturing could hang); gdspy is no longer installed with setupEM.
@@ -25,27 +33,13 @@ Needs gds2palace 0.11 and gds_prepare_for_EM 1.8 or newer (`pip install` updates
25
33
  - Ctrl+S saves into the `.simcfg` / `.tsimcfg` the model was opened from (the menu names it). Its other entries, e.g. the plug-in's link to the model script, are kept. A script edited in place and a piece of a split region are saved as before; a new model asks for a file name.
26
34
  - Closing setupEM, opening another file or File > New asks "Save the changes to ...?" when the settings changed since the file was opened or saved.
27
35
 
28
- # What's New - November 15, 2026 (setupEM 0.18.3)
29
-
30
- Needs gds2palace 0.10.7 or newer (`pip install` updates it).
31
-
32
- **`combine_extend_snp.py` 1.5** (`combine_snp`, in `scripts/`), the same file as in gds2palace 0.10.7:
33
- - The `_dc` Touchstone file keeps all simulated frequency points and adds only the 0 Hz point in front. Before, a result with the two low frequency points of a sweep from 0 Hz was resampled to a uniform frequency grid, so the simulated points, among them the two low ones, were replaced by interpolated values. The 0 Hz value itself is unchanged.
34
- - Port walls (from gds2palace 0.10.6): the line resistance of the standards is taken from the model's lowest frequency, so R and Q of models with port walls are right also below fstop/20.
35
-
36
- **Sweep from 0 Hz, the frequencies that replace DC** (a gds2palace 0.10.7 change, nothing to set in setupEM): with start frequency 0, gds2palace simulates two low frequency points instead of 0 Hz. These were always 10 MHz and 20 MHz. With a mesh finer than 0.5 µm (refined cellsize or a per-layer override), gds2palace 0.10.7 moves them up, to 5 MHz·µm divided by the smallest cell size and twice that (e.g. 25 and 50 MHz at 0.2 µm), because on such a fine mesh Palace could stop with "SuperLUSolver: Found a singular matrix" at 10 MHz. Models with cell sizes of 0.5 µm and more keep 10 and 20 MHz. The user's guide section on DC handling says this now.
37
-
38
- **Citation:** `CITATION.cff` and a "How to cite" section in the README; GitHub's **Cite this repository** button gives APA and BibTeX entries.
39
-
40
- **Internal:** the model script writer of setupEM and setupThermal is now a module without Qt (`script_writer.py`, issue #52). The written scripts are unchanged; `tests/test_script_writer.py` checks 8 recorded scripts against both the GUI and the writer.
41
-
42
36
  Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md)
43
37
 
44
38
  ---
45
39
 
46
40
  **Note:** the `setupEM` PyPI package itself requires:
47
41
 
48
- - gds2palace>=0.11.0
42
+ - gds2palace>=0.12.0
49
43
  - gds_prepare_for_EM>=1.8.0
50
44
  - PySide6
51
45
  - shiboken6
@@ -12,7 +12,7 @@ authors = [
12
12
  { name = "Volker Muehlhaus", email = "volker@muehlhaus.com" }
13
13
  ]
14
14
  dependencies = [
15
- "gds2palace>=0.11.0",
15
+ "gds2palace>=0.12.0",
16
16
  "gds_prepare_for_EM>=1.8.0",
17
17
  "PySide6",
18
18
  "shiboken6",
@@ -31,4 +31,4 @@ def main():
31
31
 
32
32
 
33
33
  __all__ = ["main"]
34
- __version__ = "0.19.0"
34
+ __version__ = "0.19.1"
@@ -167,6 +167,17 @@ VIA_POSITIVE_COLOR = PORT_OUTLINE_COLOR # pink/magenta: +Z, current out of the
167
167
  VIA_NEGATIVE_COLOR = "#3399ff" # blue: -Z, current into the page
168
168
 
169
169
 
170
+ def _via_port_is_tube(size_x, size_y):
171
+ """True if gds2palace makes a tube port (four side walls) from a via port shape of this size:
172
+ gds2palace 0.12.0 and newer, for a shape whose short side is more than 10 % of its long side.
173
+ Always False with an older gds2palace, which makes one sheet from any shape."""
174
+ try:
175
+ from gds2palace import simulation_setup
176
+ return bool(simulation_setup.via_port_is_tube(size_x, size_y))
177
+ except (ImportError, AttributeError):
178
+ return False
179
+
180
+
170
181
  def _via_marker_items(negative):
171
182
  """Graphics item for a Z/-Z via port's marker: a filled circle at the port
172
183
  location - pink for current out of the page (+Z), blue for into the page
@@ -1406,12 +1417,15 @@ class LayoutPreviewWindow(QDialog):
1406
1417
 
1407
1418
  # A via port (from_layername/to_layername, not target_layername)
1408
1419
  # whose drawn marker polygon has finite size in BOTH x and y isn't
1409
- # actually meshed as that full rectangle - gds2palace's add_ports()
1410
- # (util_simulation_setup.py) collapses whichever axis is shorter
1411
- # down to its minimum edge (not its true center, despite what the
1412
- # user guide says) and keeps only the longer axis at full extent,
1413
- # to get a single 2D sheet. Show that effective line so a
1414
- # finite-area via port doesn't look like it becomes a full sheet.
1420
+ # meshed as that full rectangle. gds2palace's add_ports()
1421
+ # (util_simulation_setup.py) makes one of two things from it:
1422
+ # - a narrow box (a line): one sheet along the longer axis, at the
1423
+ # min edge of the shorter axis (not its center);
1424
+ # - a shape with area (gds2palace 0.12.0 and newer, see
1425
+ # via_port_is_tube()): a tube port, the four side walls of the
1426
+ # bounding box.
1427
+ # Show those effective sheets so a finite-area via port doesn't
1428
+ # look like it becomes a full sheet.
1415
1429
  # Unlike the fixed-pixel-size markers above, this must scale/pan
1416
1430
  # with the real geometry, so it's added directly rather than
1417
1431
  # through the ItemIgnoresTransformations + setPos() path.
@@ -1419,25 +1433,34 @@ class LayoutPreviewWindow(QDialog):
1419
1433
  size_x = poly.xmax - poly.xmin
1420
1434
  size_y = poly.ymax - poly.ymin
1421
1435
  if size_x > 0 and size_y > 0:
1422
- if size_y > size_x:
1423
- line = QLineF(QPointF(poly.xmin, -poly.ymin), QPointF(poly.xmin, -poly.ymax))
1436
+ is_tube = _via_port_is_tube(size_x, size_y)
1437
+ x0, x1, y0, y1 = poly.xmin, poly.xmax, -poly.ymin, -poly.ymax
1438
+ if is_tube:
1439
+ lines = [QLineF(QPointF(x0, y0), QPointF(x0, y1)), QLineF(QPointF(x1, y0), QPointF(x1, y1)),
1440
+ QLineF(QPointF(x0, y0), QPointF(x1, y0)), QLineF(QPointF(x0, y1), QPointF(x1, y1))]
1441
+ sheet_tooltip = (" - tube port: the four side walls of the drawn shape "
1442
+ "(for a port that stands for a conductor, not de-embedded)")
1443
+ elif size_y > size_x:
1444
+ lines = [QLineF(QPointF(x0, y0), QPointF(x0, y1))]
1424
1445
  else:
1425
- line = QLineF(QPointF(poly.xmin, -poly.ymin), QPointF(poly.xmax, -poly.ymin))
1426
- centerline_item = QGraphicsLineItem(line)
1427
- # fat and dashed, deliberately much bolder than the
1428
- # input frame's own solid MARKER_OUTLINE_WIDTH
1429
- # outline, so it reads as the actual simulated line
1430
- # rather than getting lost inside the drawn rectangle
1431
- centerline_pen = QPen(QColor(outline_color), MARKER_OUTLINE_WIDTH * 2)
1432
- centerline_pen.setCosmetic(True)
1433
- centerline_pen.setStyle(Qt.DashLine)
1434
- centerline_item.setPen(centerline_pen)
1435
- centerline_item.setToolTip(
1436
- tooltip + " - effective via port sheet "
1437
- "(gds2palace pins the shorter axis to its min edge)")
1438
- centerline_item.setZValue(marker_zvalue + 1)
1439
- scene.addItem(centerline_item)
1440
- group.add(centerline_item)
1446
+ lines = [QLineF(QPointF(x0, y0), QPointF(x1, y0))]
1447
+ if not is_tube:
1448
+ sheet_tooltip = (" - effective via port sheet "
1449
+ "(gds2palace pins the shorter axis to its min edge)")
1450
+ for line in lines:
1451
+ centerline_item = QGraphicsLineItem(line)
1452
+ # fat and dashed, deliberately much bolder than the
1453
+ # input frame's own solid MARKER_OUTLINE_WIDTH
1454
+ # outline, so it reads as the actual simulated sheet
1455
+ # rather than getting lost inside the drawn rectangle
1456
+ centerline_pen = QPen(QColor(outline_color), MARKER_OUTLINE_WIDTH * 2)
1457
+ centerline_pen.setCosmetic(True)
1458
+ centerline_pen.setStyle(Qt.DashLine)
1459
+ centerline_item.setPen(centerline_pen)
1460
+ centerline_item.setToolTip(tooltip + sheet_tooltip)
1461
+ centerline_item.setZValue(marker_zvalue + 1)
1462
+ scene.addItem(centerline_item)
1463
+ group.add(centerline_item)
1441
1464
 
1442
1465
  text = QGraphicsSimpleTextItem(label_text)
1443
1466
  font = QFont()
@@ -2544,32 +2544,39 @@ class CreateModelTab(CreateModelTabBase):
2544
2544
  _RE_STANDARD = re.compile(r"^calibration standard (\d+) of (\d+): ([^,\s]+)")
2545
2545
  _RE_STANDARD_REUSED = re.compile(r"^\s*reused, solved")
2546
2546
  _RE_DEVICE_MODEL = re.compile(r"^device model\s*$")
2547
- _RE_EXCITATION = re.compile(r"(?:Sweeping|Adding) excitation index \d+ \((\d+)/(\d+)\):")
2547
+ # Palace 0.19 prints "Sweeping excitation index 5:" without "(k/N)" in the PROM online
2548
+ # phase, so the position is optional here and then comes from the excitation map below.
2549
+ _RE_EXCITATION = re.compile(r"(?:Sweeping|Adding) excitation index (\d+)(?: \((\d+)/(\d+)\))?:")
2550
+ # Printed once per excitation before any solve, same wording in Palace 0.15 to 0.19:
2551
+ # "Excitation 2/3 with index 5 has contributions from:" (several excitations)
2552
+ # "Excitation with index 1 has contributions from:" (one excitation)
2553
+ # It maps an excitation index to its position, for log lines that only name the index.
2554
+ _RE_EXCITATION_MAP = re.compile(r"^Excitation(?: (\d+)/(\d+))? with index (\d+) has contributions from:")
2548
2555
  # "It i/n: ... (total elapsed time = t s, solve k/N)" in a uniform sweep, but only
2549
2556
  # "It i/n: ... (total elapsed time = t s)" - no trailing solve k/N - during PROM's online
2550
2557
  # (interpolated-evaluation) phase, so the solve suffix is matched separately and is
2551
2558
  # optional; its presence is what distinguishes a real full-order solve from a PROM
2552
2559
  # evaluation (see _parse_palace_status_line).
2553
- _RE_FREQ = re.compile(r"It (\d+)/(\d+):")
2560
+ # Palace 0.19 names the excitation in the PROM online phase, which runs frequency by
2561
+ # frequency through all excitations: "It 5/119, excitation 2: ω/2π = ..." (0.18 and older:
2562
+ # "It 5/119: ω/2π = ...", one excitation after the other).
2563
+ _RE_FREQ = re.compile(r"It (\d+)/(\d+)(?:, excitation (\d+))?:")
2554
2564
  _RE_SOLVE_SUFFIX = re.compile(r"solve (\d+)/(\d+)\)")
2555
2565
  # PROM's offline phase (building the reduced-order model) has no "It i/n" progress at
2556
2566
  # all - only these per-port greedy-sampling steps, with no fixed total to divide by:
2557
2567
  # "Greedy iteration 1 (n = 4): ω* = 2.716e+01 GHz (4.986e-01), error = 7.573e-03, memory = 1/2"
2558
2568
  _RE_GREEDY = re.compile(r"Greedy iteration (\d+) \(n = (\d+)\):")
2559
- # Different Palace releases report each just-finished AMR pass differently, but both
2560
- # number 1-based from the very first (unrefined-mesh) solve - there is no "iteration 0"
2561
- # in either wording. Confirmed two ways: the "global unknowns" figure on these lines
2562
- # matches the DOF count of the solve that just finished (not a next/refined mesh), and
2563
- # palace_results.py's own output-folder naming (iteration1/, iteration2/, ...) uses the
2564
- # same 1-based scheme.
2565
- # "Completed 1 iteration of adaptive mesh refinement (AMR): Indicator norm=..., global unknowns=..." (older release)
2566
- # "Adaptive mesh refinement (AMR) iteration 1: Indicator norm=..., global unknowns=..." (v0.16.0-34-gea2e7b23)
2567
- # The newer release also prints "Proceeding with solve/estimate iteration 2..." right
2568
- # after refining/rebalancing, announcing the *next* iteration before its ports start
2569
- # solving - matched separately so the display updates immediately instead of lagging one
2570
- # iteration behind until that next iteration's own report line finally appears.
2571
- _RE_AMR_ITER_A = re.compile(r"Completed (\d+) iteration.*adaptive mesh refinement \(AMR\)")
2572
- _RE_AMR_ITER_B = re.compile(r"Adaptive mesh refinement \(AMR\) iteration (\d+):")
2569
+ # AMR lines, the same wording in Palace 0.12 to 0.19 (checked in the sources and in 0.18.1 and
2570
+ # 0.19.0 runs). Palace numbers solve passes from 1, the unrefined mesh being pass 1, like the
2571
+ # output folders iteration1/, iteration2/, ... that palace_results.py reads:
2572
+ # "Adaptive mesh refinement (AMR) iteration 1:" after pass 1 is solved, before refining
2573
+ # "Proceeding with solve/estimate iteration 2..." pass 2 (on the refined mesh) starts
2574
+ # "Completed 2 iterations of adaptive mesh refinement (AMR):" once, at the end
2575
+ # The status line counts refinements instead (the unrefined mesh is 0, the last pass of a
2576
+ # MaxIts=2 run is 2/2): pass numbers minus 1, but the final "Completed N" already counts
2577
+ # refinements and is shown as it is.
2578
+ _RE_AMR_DONE = re.compile(r"Completed (\d+) iterations? of adaptive mesh refinement \(AMR\)")
2579
+ _RE_AMR_ITER = re.compile(r"Adaptive mesh refinement \(AMR\) iteration (\d+):")
2573
2580
  _RE_AMR_PROCEEDING = re.compile(r"Proceeding with solve/estimate iteration (\d+)")
2574
2581
  # Frequency of the solve that follows: "It 7/7: ω/2π = 1.700e+02 GHz (...)" in a uniform
2575
2582
  # sweep, "Greedy iteration 1 (n = 4): ω* = 2.716e+01 GHz (...)" while PROM builds its model.
@@ -2598,6 +2605,7 @@ class CreateModelTab(CreateModelTabBase):
2598
2605
  self._status_solve_freq_ghz = None
2599
2606
  self._nonconverged = []
2600
2607
  self._status_stage = None # with port walls: which solve of run_sim runs (a standard or the model)
2608
+ self._status_excitations = {} # excitation index -> (position, total), see _RE_EXCITATION_MAP
2601
2609
  self._update_status_line()
2602
2610
 
2603
2611
  def _reset_status_for_run(self):
@@ -2631,6 +2639,7 @@ class CreateModelTab(CreateModelTabBase):
2631
2639
  def _new_solve(self, stage):
2632
2640
  """A new Palace run in run_sim (a calibration standard or the model): its own ports and frequencies"""
2633
2641
  self._status_stage = stage
2642
+ self._status_excitations = {}
2634
2643
  self._status_port_cur = self._status_port_total = None
2635
2644
  self._status_freq_display = None
2636
2645
  self._status_solve_display = ""
@@ -2664,10 +2673,18 @@ class CreateModelTab(CreateModelTabBase):
2664
2673
  self._update_status_line()
2665
2674
  return
2666
2675
 
2676
+ m = self._RE_EXCITATION_MAP.search(line)
2677
+ if m:
2678
+ position, total = (int(m.group(1)), int(m.group(2))) if m.group(1) else (1, 1)
2679
+ self._status_excitations[int(m.group(3))] = (position, total)
2680
+ return
2681
+
2667
2682
  m = self._RE_EXCITATION.search(line)
2668
2683
  if m:
2669
- self._status_port_cur = int(m.group(1))
2670
- self._status_port_total = int(m.group(2))
2684
+ if m.group(2):
2685
+ self._status_port_cur, self._status_port_total = int(m.group(2)), int(m.group(3))
2686
+ else:
2687
+ self._set_port_from_excitation_index(int(m.group(1)))
2671
2688
  # New port: the previous port's frequency/solve position no longer applies.
2672
2689
  self._status_freq_display = None
2673
2690
  self._status_solve_display = ""
@@ -2677,6 +2694,11 @@ class CreateModelTab(CreateModelTabBase):
2677
2694
 
2678
2695
  m = self._RE_FREQ.search(line)
2679
2696
  if m:
2697
+ if m.group(3):
2698
+ self._set_port_from_excitation_index(int(m.group(3)))
2699
+ elif self._status_port_cur is None and len(self._status_excitations) == 1:
2700
+ # one excitation: Palace prints no "excitation index" line at all
2701
+ self._status_port_cur = self._status_port_total = 1
2680
2702
  solve_m = self._RE_SOLVE_SUFFIX.search(line)
2681
2703
  if solve_m:
2682
2704
  # Real per-frequency full-order solve (uniform sweep) - meaningful progress.
@@ -2701,23 +2723,26 @@ class CreateModelTab(CreateModelTabBase):
2701
2723
  self._update_status_line()
2702
2724
  return
2703
2725
 
2704
- for amr_re in (self._RE_AMR_ITER_A, self._RE_AMR_ITER_B, self._RE_AMR_PROCEEDING):
2705
- m = amr_re.search(line)
2706
- if m and self._status_amr_max:
2707
- # Palace's own log numbers the initial, unrefined-mesh solve as "iteration
2708
- # 1" (confirmed earlier against DOF counts and palace_results.py's own
2709
- # iteration1/iteration2/... folder naming). Displayed here shifted down by
2710
- # 1 instead, so the initial solve reads "0" and each subsequent number
2711
- # counts completed *refinements* - e.g. the 2nd refinement (Palace's
2712
- # "iteration 3") reads "2/2" against a MaxIts=2 config, not "3/2". Not
2713
- # clamped to amr_max: MaxIts caps refinement actions, not solve passes, so
2714
- # the last legitimate pass is Palace's "iteration MaxIts+1" (displayed
2715
- # "MaxIts") - showing whatever Palace actually reports is more honest than
2716
- # silently capping it.
2717
- self._status_amr_cur = int(m.group(1)) - 1
2726
+ if self._status_amr_max:
2727
+ m = self._RE_AMR_DONE.search(line)
2728
+ if m:
2729
+ self._status_amr_cur = int(m.group(1))
2730
+ else:
2731
+ m = self._RE_AMR_ITER.search(line) or self._RE_AMR_PROCEEDING.search(line)
2732
+ if m:
2733
+ # Not clamped to MaxIts: showing what Palace reports is more honest.
2734
+ self._status_amr_cur = int(m.group(1)) - 1
2735
+ if m:
2718
2736
  self._update_status_line()
2719
2737
  return
2720
2738
 
2739
+ def _set_port_from_excitation_index(self, index):
2740
+ """Port k/N from a log line that only names the excitation index (Palace 0.19)"""
2741
+ if index in self._status_excitations:
2742
+ self._status_port_cur, self._status_port_total = self._status_excitations[index]
2743
+ else:
2744
+ self._status_port_cur, self._status_port_total = index, "?"
2745
+
2721
2746
  def _report_nonconvergence(self, iterations):
2722
2747
  """Flag an unconverged Palace linear solve right away in the log, and remember
2723
2748
  it for the end-of-run summary (_nonconvergence_summary(), from on_finished()).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setupEM
3
- Version: 0.19.0
3
+ Version: 0.19.1
4
4
  Summary: Python tool for configuration of gds2palace workflow with GUI.
5
5
  Author-email: Volker Muehlhaus <volker@muehlhaus.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -10,7 +10,7 @@ Project-URL: Changelog, https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc
10
10
  Requires-Python: >=3.9
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: gds2palace>=0.11.0
13
+ Requires-Dist: gds2palace>=0.12.0
14
14
  Requires-Dist: gds_prepare_for_EM>=1.8.0
15
15
  Requires-Dist: PySide6
16
16
  Requires-Dist: shiboken6
@@ -40,6 +40,14 @@ https://github.com/VolkerMuehlhaus/setupEM
40
40
 
41
41
  ## Recent changes
42
42
 
43
+ # What's New - November 22, 2026 (setupEM 0.19.1)
44
+
45
+ Needs gds2palace 0.12.0 or newer (`pip install` updates it).
46
+
47
+ **Tube ports in the layout preview.** gds2palace 0.12.0 builds a via port shape drawn with an area (short side more than 10 % of the long side) as a tube port: the four side walls of the shape's bounding box, as one port. This is meant for a port that stands for a real conductor, e.g. a copper pillar between two chips that are simulated as two separate models (example `more_examples/chiplet_split_at_pillars` in the gds2palace repository). The layout preview draws such a port as its four walls. Via ports drawn as lines are shown as one sheet, as before.
48
+
49
+ **Status line with Palace 0.19.** Palace 0.19 writes the progress of the adaptive frequency sweep in a new form, and the status line stayed at "Port: n/a | Freq: ROM build" for the whole sweep. It now shows port and frequency progress with Palace 0.19 as with older versions, and a model with one excitation shows "Port 1/1". After a run with adaptive mesh refinement, the AMR iteration no longer drops back by one at the end (e.g. from 2/2 to 1/2).
50
+
43
51
  # What's New - November 19, 2026 (setupEM 0.19.0)
44
52
 
45
53
  Needs gds2palace 0.11 and gds_prepare_for_EM 1.8 or newer (`pip install` updates them). setupEM, gds2palace and gds_prepare_for_EM read layouts with gdstk now instead of gdspy, which is no longer maintained (its polygon fracturing could hang); gdspy is no longer installed with setupEM.
@@ -54,27 +62,13 @@ Needs gds2palace 0.11 and gds_prepare_for_EM 1.8 or newer (`pip install` updates
54
62
  - Ctrl+S saves into the `.simcfg` / `.tsimcfg` the model was opened from (the menu names it). Its other entries, e.g. the plug-in's link to the model script, are kept. A script edited in place and a piece of a split region are saved as before; a new model asks for a file name.
55
63
  - Closing setupEM, opening another file or File > New asks "Save the changes to ...?" when the settings changed since the file was opened or saved.
56
64
 
57
- # What's New - November 15, 2026 (setupEM 0.18.3)
58
-
59
- Needs gds2palace 0.10.7 or newer (`pip install` updates it).
60
-
61
- **`combine_extend_snp.py` 1.5** (`combine_snp`, in `scripts/`), the same file as in gds2palace 0.10.7:
62
- - The `_dc` Touchstone file keeps all simulated frequency points and adds only the 0 Hz point in front. Before, a result with the two low frequency points of a sweep from 0 Hz was resampled to a uniform frequency grid, so the simulated points, among them the two low ones, were replaced by interpolated values. The 0 Hz value itself is unchanged.
63
- - Port walls (from gds2palace 0.10.6): the line resistance of the standards is taken from the model's lowest frequency, so R and Q of models with port walls are right also below fstop/20.
64
-
65
- **Sweep from 0 Hz, the frequencies that replace DC** (a gds2palace 0.10.7 change, nothing to set in setupEM): with start frequency 0, gds2palace simulates two low frequency points instead of 0 Hz. These were always 10 MHz and 20 MHz. With a mesh finer than 0.5 µm (refined cellsize or a per-layer override), gds2palace 0.10.7 moves them up, to 5 MHz·µm divided by the smallest cell size and twice that (e.g. 25 and 50 MHz at 0.2 µm), because on such a fine mesh Palace could stop with "SuperLUSolver: Found a singular matrix" at 10 MHz. Models with cell sizes of 0.5 µm and more keep 10 and 20 MHz. The user's guide section on DC handling says this now.
66
-
67
- **Citation:** `CITATION.cff` and a "How to cite" section in the README; GitHub's **Cite this repository** button gives APA and BibTeX entries.
68
-
69
- **Internal:** the model script writer of setupEM and setupThermal is now a module without Qt (`script_writer.py`, issue #52). The written scripts are unchanged; `tests/test_script_writer.py` checks 8 recorded scripts against both the GUI and the writer.
70
-
71
65
  Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md)
72
66
 
73
67
  ---
74
68
 
75
69
  **Note:** the `setupEM` PyPI package itself requires:
76
70
 
77
- - gds2palace>=0.11.0
71
+ - gds2palace>=0.12.0
78
72
  - gds_prepare_for_EM>=1.8.0
79
73
  - PySide6
80
74
  - shiboken6
@@ -54,6 +54,7 @@ tests/test_save_current_file.py
54
54
  tests/test_script_model.py
55
55
  tests/test_script_probe.py
56
56
  tests/test_script_writer.py
57
+ tests/test_status_line.py
57
58
  tests/test_table_rows.py
58
59
  tests/test_thermal_powers.py
59
60
  tests/test_thermal_results.py
@@ -1,4 +1,4 @@
1
- gds2palace>=0.11.0
1
+ gds2palace>=0.12.0
2
2
  gds_prepare_for_EM>=1.8.0
3
3
  PySide6
4
4
  shiboken6
@@ -0,0 +1,117 @@
1
+ """Live Palace status line: port and frequency progress parsed from Palace 0.18 and 0.19 logs.
2
+
3
+ The log lines are copied from real runs of the pcb_lowpass model (adaptive sweep, 119 frequencies)
4
+ with palace_0181_x86_64_v3.sif and palace_0190_x86_64_v3.sif.
5
+ """
6
+
7
+ import os
8
+
9
+ os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
10
+
11
+ import pytest # noqa: E402
12
+ from PySide6.QtWidgets import QApplication # noqa: E402
13
+
14
+
15
+ @pytest.fixture(scope="module")
16
+ def tab():
17
+ QApplication.instance() or QApplication([])
18
+ from setupEM.setupEM import CreateModelTab
19
+
20
+ class Label:
21
+ text_ = ""
22
+
23
+ def setText(self, text):
24
+ self.text_ = text
25
+
26
+ def text(self):
27
+ return self.text_
28
+
29
+ class Log:
30
+ def appendPlainText(self, text):
31
+ pass
32
+
33
+ class Window:
34
+ APP_NAME = "setupEM"
35
+ PalaceMode = True
36
+
37
+ # only the parser and the status line, without building the tab's widgets
38
+ tab = CreateModelTab.__new__(CreateModelTab)
39
+ tab.status_line, tab.log_area, tab.MainWindow = Label(), Log(), Window()
40
+ return tab
41
+
42
+
43
+ def feed(tab, lines):
44
+ tab._init_status_state()
45
+ for line in lines:
46
+ tab._parse_palace_status_line(line)
47
+ return tab.status_line.text()
48
+
49
+
50
+ SETUP_TWO = ["Running with 16 MPI processes",
51
+ "Excitation 1/2 with index 1 has contributions from:",
52
+ "Excitation 2/2 with index 2 has contributions from:",
53
+ "Adding excitation index 1 (1/2):",
54
+ "Greedy iteration 1 (n = 4): ω* = 5.902e+00 GHz (7.064e+00), error = 3.901e-01, memory = 0/2",
55
+ "Adding excitation index 2 (2/2):"]
56
+
57
+
58
+ def test_palace_018_prom_online_phase(tab):
59
+ text = feed(tab, SETUP_TWO + ["Sweeping excitation index 2 (2/2):",
60
+ "It 3/119: ω/2π = 2.000e-01 GHz (total elapsed time = 8.19e+00 s)"])
61
+ assert "Port: 2/2" in text and "Freq: 3/119 (PROM eval)" in text
62
+
63
+
64
+ def test_palace_019_prom_online_phase_names_the_excitation(tab):
65
+ text = feed(tab, SETUP_TWO + ["It 60/119, excitation 1: ω/2π = 3.050e+00 GHz (total elapsed time = 7.62e+00 s)"])
66
+ assert "Port: 1/2" in text and "Freq: 60/119 (PROM eval)" in text
67
+ tab._parse_palace_status_line("It 60/119, excitation 2: ω/2π = 3.050e+00 GHz (total elapsed time = 7.62e+00 s)")
68
+ assert "Port: 2/2" in tab.status_line.text()
69
+
70
+
71
+ def test_palace_019_sweeping_line_without_position(tab):
72
+ """0.19 with field output: "Sweeping excitation index k:" in the online phase, no (k/N)"""
73
+ text = feed(tab, SETUP_TWO + ["Sweeping excitation index 2:"])
74
+ assert "Port: 2/2" in text
75
+
76
+
77
+ @pytest.mark.parametrize("it_line", [
78
+ "It 7/119: ω/2π = 4.000e-01 GHz (total elapsed time = 5.93e+00 s)", # 0.18
79
+ "It 7/119, excitation 1: ω/2π = 4.000e-01 GHz (total elapsed time = 5.90e+00 s)", # 0.19
80
+ ])
81
+ def test_one_excitation_shows_port_1_of_1(tab, it_line):
82
+ """Palace prints no "excitation index" line for a single excitation"""
83
+ text = feed(tab, ["Excitation with index 1 has contributions from:", it_line])
84
+ assert "Port: 1/1" in text and "Freq: 7/119 (PROM eval)" in text
85
+
86
+
87
+ def test_uniform_sweep_is_unchanged(tab):
88
+ text = feed(tab, ["Sweeping excitation index 2 (2/8):",
89
+ "It 1/1: ω/2π = 9.300e+01 GHz (total elapsed time = 1.52e+01 s, solve 9/64)"])
90
+ assert "Port: 2/8" in text and "Freq: 1/1 (solve 9/64)" in text
91
+
92
+
93
+ def test_amr_counts_refinements_up_to_the_end(tab):
94
+ """AMR lines of a MaxIts=2 run, the same in Palace 0.18.1 and 0.19.0: the final summary keeps 2/2"""
95
+ tab._init_status_state()
96
+ tab._status_amr_max, tab._status_amr_cur = 2, 0 # as _reset_status_for_run() sets them
97
+ seen = []
98
+ for line in ["It 3/3: ω/2π = 5.000e+00 GHz (total elapsed time = 2.06e+00 s, solve 3/6)",
99
+ "Adaptive mesh refinement (AMR) iteration 1:",
100
+ "Proceeding with solve/estimate iteration 2...",
101
+ "Adaptive mesh refinement (AMR) iteration 2:",
102
+ "Proceeding with solve/estimate iteration 3...",
103
+ "Completed 2 iterations of adaptive mesh refinement (AMR):"]:
104
+ tab._parse_palace_status_line(line)
105
+ seen.append(tab.status_line.text().split("AMR iteration: ")[1])
106
+ assert seen == ["0/2", "0/2", "1/2", "1/2", "2/2", "2/2"]
107
+
108
+
109
+ def test_amr_stopped_by_tolerance(tab):
110
+ """AMR ends before MaxIts when the error indicator is below the tolerance"""
111
+ tab._init_status_state()
112
+ tab._status_amr_max, tab._status_amr_cur = 5, 0
113
+ for line in ["Adaptive mesh refinement (AMR) iteration 1:",
114
+ "Proceeding with solve/estimate iteration 2...",
115
+ "Completed 1 iteration of adaptive mesh refinement (AMR):"]:
116
+ tab._parse_palace_status_line(line)
117
+ assert "AMR iteration: 1/5" in tab.status_line.text()
File without changes
File without changes
File without changes