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.
- {setupem-0.2.1 → setupem-0.2.2}/PKG-INFO +1 -1
- {setupem-0.2.1 → setupem-0.2.2}/pyproject.toml +1 -1
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/setupThermal.py +20 -43
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM.egg-info/PKG-INFO +1 -1
- {setupem-0.2.1 → setupem-0.2.2}/README.md +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/setup.cfg +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/__init__.py +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/__main__.py +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/data/SG13G2_100um.xml +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/data/SG13G2_200um.xml +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/data/SG13G2_nosub.xml +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM/setupEM.py +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM.egg-info/SOURCES.txt +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM.egg-info/dependency_links.txt +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM.egg-info/entry_points.txt +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM.egg-info/requires.txt +0 -0
- {setupem-0.2.1 → setupem-0.2.2}/src/setupEM.egg-info/top_level.txt +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|