setupEM 0.2.1__tar.gz → 0.2.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setupEM
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Python tool for configuration of gds2palace workflow with GUI.
5
5
  Author-email: Volker Muehlhaus <volker@muehlhaus.com>
6
6
  Requires-Python: >=3.9
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "setupEM"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Python tool for configuration of gds2palace workflow with GUI."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -1408,29 +1408,6 @@ class CodeEditor(QPlainTextEdit):
1408
1408
 
1409
1409
  # ---------- POP UP WINDOW TO SHOW STACKUP ------------------
1410
1410
 
1411
- def epsilon_to_color(erel, transparency):
1412
- # Compute raw float components
1413
- red = 250 - 30 * (erel - 1)
1414
- green = 255 - 20 * (erel - 1) + (20 / erel) + 10 * erel
1415
- blue = 100 + 15 * erel + (250 / erel)
1416
-
1417
- # Extra adjustment
1418
- if 3.8 < erel < 4.5:
1419
- red += 50 * (erel - 3.8)
1420
- green -= 100 * (erel - 3.8)
1421
-
1422
- # Clamp to range 0–255
1423
- red = min(max(red, 0), 255)
1424
- green = min(max(green, 0), 255)
1425
- blue = min(max(blue, 0), 255)
1426
-
1427
- # Convert to integer RGB
1428
- r = int(round(red))
1429
- g = int(round(green))
1430
- b = int(round(blue))
1431
-
1432
- return QColor(r, g, b, transparency)
1433
-
1434
1411
 
1435
1412
  class VectorWidget(QWidget):
1436
1413
  """This widget actually draws the stackup preview"""
@@ -1497,11 +1474,9 @@ class VectorWidget(QWidget):
1497
1474
  dielectric_shape['dielectric'] = dielectric
1498
1475
  dielectric_shape['numparts'] = parts
1499
1476
 
1500
- # dielectric color is calculated from permittivity
1501
1477
  materialname = dielectric.material
1502
1478
  material = self.materials_list.get_by_name(materialname)
1503
- eps = material.eps
1504
- dielectric_shape['color'] = epsilon_to_color(eps, 95) # QColor(Qt.white)
1479
+ dielectric_shape['color'] = QColor(Qt.white)
1505
1480
  dielectric_shape['material'] = material
1506
1481
 
1507
1482
  total_parts = total_parts + parts
@@ -1525,10 +1500,11 @@ class VectorWidget(QWidget):
1525
1500
  color = dielectric_shape['color']
1526
1501
  material = dielectric_shape['material']
1527
1502
 
1528
- material_string = f'εr={material.eps:.1f}'
1529
- if material.sigma > 1e-3:
1530
- material_string = material_string + f' σ={material.sigma:.1f}'
1531
- material_string = material_string + f'\n{dielectric.thickness:.2f}µm'
1503
+ if material.thermaltablename == "":
1504
+ material_string = f'κ={material.thermalcond:.1f}'
1505
+ else:
1506
+ material_string = "κ=table"
1507
+
1532
1508
 
1533
1509
  painter.setPen(penBlack)
1534
1510
  painter.setBrush(color)
@@ -1587,18 +1563,11 @@ class VectorWidget(QWidget):
1587
1563
  if metal.is_sheet:
1588
1564
  # sheet metal that is simulated with zero extrusion
1589
1565
  height = 3
1590
- resistance_string = f'Rs={material.Rs*1e3:.1f}mΩ'
1591
- else:
1566
+ kappa_string = ""
1567
+ else:
1592
1568
  # regular extruded metal
1569
+ kappa_string = f'κ={material.thermalcond:.1f}'
1593
1570
  height = part_height/2
1594
- if (material.sigma > 0) and (metal.thickness > 0):
1595
- Rs = 1 / (material.sigma*metal.thickness*1e-6)
1596
- if Rs < 1:
1597
- resistance_string = f'Rs={Rs*1e3:.1f} mΩ'
1598
- else:
1599
- resistance_string = f'Rs={Rs:.2f} Ω'
1600
- else:
1601
- resistance_string = '? ' + material.type + ' ?'
1602
1571
 
1603
1572
  # the box for this metal
1604
1573
  if material.type.upper() == "CONDUCTOR":
@@ -1612,12 +1581,12 @@ class VectorWidget(QWidget):
1612
1581
  height = part_height/2
1613
1582
  painter.setBrush(QColor(255,0,0, 80))
1614
1583
  painter.drawRect(xmetal, flipy(ymetal), wmetal, -int(height))
1615
- resistance_string = 'INVALID MATERIAL REFERENCE: ' + metal.material
1584
+ kappa_string = 'INVALID MATERIAL REFERENCE: ' + metal.material
1616
1585
 
1617
1586
  painter.setPen(penBlack)
1618
1587
  drawText_left(xmetal+10, flipy(ymetal), wmetal, part_height/2, f"{metal.name} ({metal.layernum})" )
1619
1588
  painter.setPen(penGray)
1620
- drawText_right(xmetal, flipy(ymetal), wmetal-10, part_height/2, resistance_string)
1589
+ drawText_right(xmetal, flipy(ymetal), wmetal-10, part_height/2, kappa_string)
1621
1590
  # store the drawing position, because vias will refer to that
1622
1591
  if not metal.zmin in stored_z:
1623
1592
  stored_z = np.append(stored_z, metal.zmin)
@@ -1685,6 +1654,14 @@ class VectorWidget(QWidget):
1685
1654
  painter.setBrush(QColor(136,192,200,80))
1686
1655
  for metal in self.metals_list.metals:
1687
1656
  if metal.is_via or metal.is_dielectric:
1657
+
1658
+ material = self.materials_list.get_by_name(metal.material)
1659
+ if material is not None:
1660
+ # regular extruded metal
1661
+ kappa_string = f'κ={material.thermalcond:.1f}'
1662
+ else:
1663
+ kappa_string = ""
1664
+
1688
1665
  y1 = z_to_y(metal.zmin)
1689
1666
  y2 = z_to_y(metal.zmax)
1690
1667
  h = abs(y2-y1)
@@ -1701,7 +1678,7 @@ class VectorWidget(QWidget):
1701
1678
 
1702
1679
  painter.setPen(penBlack)
1703
1680
  painter.drawRect(xvia, flipy(y1), w, -h)
1704
- painter.drawText(xvia+5, flipy(y1+5), f"{metal.name} ({metal.layernum})")
1681
+ painter.drawText(xvia+5, flipy(y1+5), f"{metal.name} ({metal.layernum}) {kappa_string}")
1705
1682
 
1706
1683
  painter.end()
1707
1684
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: setupEM
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Python tool for configuration of gds2palace workflow with GUI.
5
5
  Author-email: Volker Muehlhaus <volker@muehlhaus.com>
6
6
  Requires-Python: >=3.9
File without changes
File without changes
File without changes
File without changes
File without changes