kececilayout 0.5.6__tar.gz → 0.5.8__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.
- {kececilayout-0.5.6/kececilayout.egg-info → kececilayout-0.5.8}/PKG-INFO +1 -1
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout/__init__.py +7 -1
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout/_version.py +1 -2
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout/kececi_layout.py +286 -5
- {kececilayout-0.5.6 → kececilayout-0.5.8/kececilayout.egg-info}/PKG-INFO +1 -1
- {kececilayout-0.5.6 → kececilayout-0.5.8}/pyproject.toml +3 -1
- kececilayout-0.5.8/setup.cfg +24 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/tests/test_sample.py +2 -0
- kececilayout-0.5.6/setup.cfg +0 -4
- {kececilayout-0.5.6 → kececilayout-0.5.8}/LICENSE +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/MANIFEST.in +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/README.md +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/docs/conf.py +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout.egg-info/SOURCES.txt +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout.egg-info/dependency_links.txt +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout.egg-info/requires.txt +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/kececilayout.egg-info/top_level.txt +0 -0
- {kececilayout-0.5.6 → kececilayout-0.5.8}/setup.py +0 -0
|
@@ -10,7 +10,7 @@ import inspect
|
|
|
10
10
|
import warnings
|
|
11
11
|
|
|
12
12
|
# Paket sürüm numarası
|
|
13
|
-
__version__ = "0.5.
|
|
13
|
+
__version__ = "0.5.8"
|
|
14
14
|
|
|
15
15
|
# =============================================================================
|
|
16
16
|
# OTOMATİK İÇE AKTARMA VE __all__ OLUŞTURMA
|
|
@@ -65,6 +65,8 @@ from .kececi_layout import ( # Veya fonksiyonların bulunduğu asıl modül
|
|
|
65
65
|
avg_edge_length,
|
|
66
66
|
_segments_intersect,
|
|
67
67
|
count_edge_crossings,
|
|
68
|
+
generate_complete_periodic_table,
|
|
69
|
+
load_element_data_from_python_dict,
|
|
68
70
|
|
|
69
71
|
# Drawing functions
|
|
70
72
|
draw_kececi,
|
|
@@ -121,6 +123,8 @@ __all__ = [
|
|
|
121
123
|
'avg_edge_length',
|
|
122
124
|
'_segments_intersect',
|
|
123
125
|
'count_edge_crossings',
|
|
126
|
+
'generate_complete_periodic_table',
|
|
127
|
+
'load_element_data_from_python_dict',
|
|
124
128
|
|
|
125
129
|
# Drawing functions
|
|
126
130
|
'draw_kececi',
|
|
@@ -177,3 +181,5 @@ def old_function_placeholder():
|
|
|
177
181
|
|
|
178
182
|
|
|
179
183
|
|
|
184
|
+
|
|
185
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# _version.py
|
|
2
2
|
|
|
3
|
-
__version__ = "0.5.
|
|
3
|
+
__version__ = "0.5.8"
|
|
4
4
|
__license__ = "AGPL3.0-or-later"
|
|
5
5
|
__description__ = "A deterministic node placement algorithm used in graph visualization. In this layout, nodes are arranged sequentially along a defined primary axis. Each subsequent node is then alternately offset along a secondary, perpendicular axis, typically moving to one side of the primary axis and then the other. Often, the magnitude of this secondary offset increases as nodes progress along the primary axis, creating a characteristic zig-zag or serpentine pattern."
|
|
6
6
|
__author__ = "Mehmet Keçeci"
|
|
@@ -8,4 +8,3 @@ __url__ = "https://github.com/WhiteSymmetry/kececilayout"
|
|
|
8
8
|
__docs__ = "https://github.com/WhiteSymmetry/kececilayout" # Opsiyonel: Dokümantasyon linki
|
|
9
9
|
__dependencies__ = ["python>=3.11"] # Diğer bağımlılıkları da ekleyebilirsiniz
|
|
10
10
|
|
|
11
|
-
|
|
@@ -34,8 +34,10 @@ import networkit as nk
|
|
|
34
34
|
import networkx as nx
|
|
35
35
|
import numpy as np # rustworkx
|
|
36
36
|
from numba import jit
|
|
37
|
+
import os
|
|
37
38
|
import platform # graph_tool için
|
|
38
39
|
import random
|
|
40
|
+
import re
|
|
39
41
|
import rustworkx as rx
|
|
40
42
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
41
43
|
import warnings
|
|
@@ -1558,29 +1560,306 @@ def _kececi_layout_3d_helix(nx_graph):
|
|
|
1558
1560
|
def kececi_layout_3d_helix_parametric(nx_graph, z_spacing=2.0, radius=5.0, turns=2.0):
|
|
1559
1561
|
"""
|
|
1560
1562
|
Parametric 3D helix layout for nodes. User can control spacing, radius, and number of turns.
|
|
1563
|
+
Fixed version with division by zero handling.
|
|
1564
|
+
|
|
1561
1565
|
Args:
|
|
1562
1566
|
nx_graph: NetworkX graph.
|
|
1563
1567
|
z_spacing (float): Vertical distance between consecutive nodes.
|
|
1564
1568
|
radius (float): Radius of the helix.
|
|
1565
1569
|
turns (float): Number of full turns the helix makes.
|
|
1570
|
+
|
|
1566
1571
|
Returns:
|
|
1567
1572
|
dict: {node_id: (x, y, z)}
|
|
1568
1573
|
"""
|
|
1569
1574
|
nodes = sorted(list(nx_graph.nodes()))
|
|
1570
1575
|
pos_3d = {}
|
|
1571
1576
|
total_nodes = len(nodes)
|
|
1577
|
+
|
|
1572
1578
|
if total_nodes == 0:
|
|
1579
|
+
print(f"Warning: Graph has {total_nodes} nodes!")
|
|
1573
1580
|
return pos_3d
|
|
1574
1581
|
|
|
1575
1582
|
total_angle = 2 * np.pi * turns
|
|
1583
|
+
|
|
1576
1584
|
for i, node_id in enumerate(nodes):
|
|
1577
1585
|
z = i * z_spacing
|
|
1578
|
-
|
|
1586
|
+
|
|
1587
|
+
# Division by zero fix for single node case
|
|
1588
|
+
if total_nodes > 1:
|
|
1589
|
+
angle = (i / (total_nodes - 1)) * total_angle
|
|
1590
|
+
else:
|
|
1591
|
+
angle = 0
|
|
1592
|
+
|
|
1579
1593
|
x = np.cos(angle) * radius
|
|
1580
1594
|
y = np.sin(angle) * radius
|
|
1581
1595
|
pos_3d[node_id] = (x, y, z)
|
|
1596
|
+
|
|
1582
1597
|
return pos_3d
|
|
1583
1598
|
|
|
1599
|
+
def load_element_data_from_python_dict(filename):
|
|
1600
|
+
"""Loads element data from a Python dictionary format file."""
|
|
1601
|
+
element_data = {}
|
|
1602
|
+
spectral_lines = {}
|
|
1603
|
+
|
|
1604
|
+
print(f"Loading file: {filename}")
|
|
1605
|
+
print(f"File exists: {os.path.exists(filename)}")
|
|
1606
|
+
|
|
1607
|
+
if not os.path.exists(filename):
|
|
1608
|
+
print(f"ERROR: File '{filename}' not found in directory: {os.getcwd()}")
|
|
1609
|
+
return element_data, spectral_lines
|
|
1610
|
+
|
|
1611
|
+
try:
|
|
1612
|
+
with open(filename, 'r', encoding='utf-8') as f:
|
|
1613
|
+
content = f.read()
|
|
1614
|
+
|
|
1615
|
+
# Find element_data dictionary
|
|
1616
|
+
element_data_match = re.search(r'element_data\s*=\s*\{([^}]+)\}', content, re.DOTALL)
|
|
1617
|
+
if element_data_match:
|
|
1618
|
+
element_data_str = element_data_match.group(0)
|
|
1619
|
+
print("Found element_data dictionary")
|
|
1620
|
+
|
|
1621
|
+
# generate a safe environment to evaluate the dictionary
|
|
1622
|
+
safe_dict = {}
|
|
1623
|
+
exec(element_data_str, {"__builtins__": {}}, safe_dict)
|
|
1624
|
+
|
|
1625
|
+
if 'element_data' in safe_dict:
|
|
1626
|
+
element_data = safe_dict['element_data']
|
|
1627
|
+
print(f"Successfully loaded {len(element_data)} elements")
|
|
1628
|
+
else:
|
|
1629
|
+
print("element_data not found in evaluated content")
|
|
1630
|
+
|
|
1631
|
+
# Manual parsing as fallback
|
|
1632
|
+
print("Attempting manual parsing...")
|
|
1633
|
+
lines = element_data_str.split('\n')
|
|
1634
|
+
for line in lines:
|
|
1635
|
+
line = line.strip()
|
|
1636
|
+
if ':' in line and '(' in line:
|
|
1637
|
+
# Parse line like: 1: ("H", 1),
|
|
1638
|
+
match = re.search(r'(\d+):\s*\("([^"]+)",\s*(\d+)\)', line)
|
|
1639
|
+
if match:
|
|
1640
|
+
key = int(match.group(1))
|
|
1641
|
+
symbol = match.group(2)
|
|
1642
|
+
atomic_num = int(match.group(3))
|
|
1643
|
+
element_data[key] = (symbol, atomic_num)
|
|
1644
|
+
|
|
1645
|
+
# Find spectral_lines dictionary if exists
|
|
1646
|
+
spectral_match = re.search(r'spectral_lines\s*=\s*\{([^}]+)\}', content, re.DOTALL)
|
|
1647
|
+
if spectral_match:
|
|
1648
|
+
spectral_str = spectral_match.group(0)
|
|
1649
|
+
print("Found spectral_lines dictionary")
|
|
1650
|
+
|
|
1651
|
+
safe_dict = {}
|
|
1652
|
+
exec(spectral_str, {"__builtins__": {}}, safe_dict)
|
|
1653
|
+
|
|
1654
|
+
if 'spectral_lines' in safe_dict:
|
|
1655
|
+
spectral_lines = safe_dict['spectral_lines']
|
|
1656
|
+
print(f"Successfully loaded {len(spectral_lines)} spectral lines")
|
|
1657
|
+
|
|
1658
|
+
# If no dictionaries found, try simple CSV format
|
|
1659
|
+
if not element_data:
|
|
1660
|
+
print("No dictionaries found, trying CSV format...")
|
|
1661
|
+
lines = content.split('\n')
|
|
1662
|
+
current_section = None
|
|
1663
|
+
|
|
1664
|
+
for line in lines:
|
|
1665
|
+
line = line.strip()
|
|
1666
|
+
if not line or line.startswith('#'):
|
|
1667
|
+
if "element" in line.lower():
|
|
1668
|
+
current_section = "element"
|
|
1669
|
+
elif "spectral" in line.lower():
|
|
1670
|
+
current_section = "spectral"
|
|
1671
|
+
continue
|
|
1672
|
+
|
|
1673
|
+
parts = [p.strip() for p in line.split(',')]
|
|
1674
|
+
if current_section == "element" and len(parts) >= 2:
|
|
1675
|
+
try:
|
|
1676
|
+
symbol = parts[0]
|
|
1677
|
+
atomic_number = int(parts[1])
|
|
1678
|
+
element_data[atomic_number] = (symbol, atomic_number)
|
|
1679
|
+
except:
|
|
1680
|
+
continue
|
|
1681
|
+
elif current_section == "spectral" and len(parts) >= 2:
|
|
1682
|
+
symbol = parts[0]
|
|
1683
|
+
wavelengths = []
|
|
1684
|
+
for wl in parts[1:]:
|
|
1685
|
+
if wl:
|
|
1686
|
+
try:
|
|
1687
|
+
wavelengths.append(float(wl))
|
|
1688
|
+
except:
|
|
1689
|
+
continue
|
|
1690
|
+
if wavelengths:
|
|
1691
|
+
spectral_lines[symbol] = wavelengths
|
|
1692
|
+
|
|
1693
|
+
except Exception as e:
|
|
1694
|
+
print(f"Error reading/parsing file: {str(e)}")
|
|
1695
|
+
import traceback
|
|
1696
|
+
traceback.print_exc()
|
|
1697
|
+
|
|
1698
|
+
print(f"\nTotal elements loaded: {len(element_data)}")
|
|
1699
|
+
print(f"Total spectral lines loaded: {len(spectral_lines)}")
|
|
1700
|
+
|
|
1701
|
+
if element_data:
|
|
1702
|
+
print("\nFirst 10 elements:")
|
|
1703
|
+
for i, (key, val) in enumerate(list(element_data.items())[:10]):
|
|
1704
|
+
print(f" {key}: {val}")
|
|
1705
|
+
|
|
1706
|
+
return element_data, spectral_lines
|
|
1707
|
+
|
|
1708
|
+
def generate_complete_periodic_table():
|
|
1709
|
+
"""generate a complete periodic table with all 118 elements."""
|
|
1710
|
+
print("Creating complete periodic table...")
|
|
1711
|
+
|
|
1712
|
+
periodic_elements = {
|
|
1713
|
+
1: ('H', 1), 2: ('He', 2), 3: ('Li', 3), 4: ('Be', 4), 5: ('B', 5),
|
|
1714
|
+
6: ('C', 6), 7: ('N', 7), 8: ('O', 8), 9: ('F', 9), 10: ('Ne', 10),
|
|
1715
|
+
11: ('Na', 11), 12: ('Mg', 12), 13: ('Al', 13), 14: ('Si', 14), 15: ('P', 15),
|
|
1716
|
+
16: ('S', 16), 17: ('Cl', 17), 18: ('Ar', 18), 19: ('K', 19), 20: ('Ca', 20),
|
|
1717
|
+
21: ('Sc', 21), 22: ('Ti', 22), 23: ('V', 23), 24: ('Cr', 24), 25: ('Mn', 25),
|
|
1718
|
+
26: ('Fe', 26), 27: ('Co', 27), 28: ('Ni', 28), 29: ('Cu', 29), 30: ('Zn', 30),
|
|
1719
|
+
31: ('Ga', 31), 32: ('Ge', 32), 33: ('As', 33), 34: ('Se', 34), 35: ('Br', 35),
|
|
1720
|
+
36: ('Kr', 36), 37: ('Rb', 37), 38: ('Sr', 38), 39: ('Y', 39), 40: ('Zr', 40),
|
|
1721
|
+
41: ('Nb', 41), 42: ('Mo', 42), 43: ('Tc', 43), 44: ('Ru', 44), 45: ('Rh', 45),
|
|
1722
|
+
46: ('Pd', 46), 47: ('Ag', 47), 48: ('Cd', 48), 49: ('In', 49), 50: ('Sn', 50),
|
|
1723
|
+
51: ('Sb', 51), 52: ('Te', 52), 53: ('I', 53), 54: ('Xe', 54), 55: ('Cs', 55),
|
|
1724
|
+
56: ('Ba', 56), 57: ('La', 57), 58: ('Ce', 58), 59: ('Pr', 59), 60: ('Nd', 60),
|
|
1725
|
+
61: ('Pm', 61), 62: ('Sm', 62), 63: ('Eu', 63), 64: ('Gd', 64), 65: ('Tb', 65),
|
|
1726
|
+
66: ('Dy', 66), 67: ('Ho', 67), 68: ('Er', 68), 69: ('Tm', 69), 70: ('Yb', 70),
|
|
1727
|
+
71: ('Lu', 71), 72: ('Hf', 72), 73: ('Ta', 73), 74: ('W', 74), 75: ('Re', 75),
|
|
1728
|
+
76: ('Os', 76), 77: ('Ir', 77), 78: ('Pt', 78), 79: ('Au', 79), 80: ('Hg', 80),
|
|
1729
|
+
81: ('Tl', 81), 82: ('Pb', 82), 83: ('Bi', 83), 84: ('Po', 84), 85: ('At', 85),
|
|
1730
|
+
86: ('Rn', 86), 87: ('Fr', 87), 88: ('Ra', 88), 89: ('Ac', 89), 90: ('Th', 90),
|
|
1731
|
+
91: ('Pa', 91), 92: ('U', 92), 93: ('Np', 93), 94: ('Pu', 94), 95: ('Am', 95),
|
|
1732
|
+
96: ('Cm', 96), 97: ('Bk', 97), 98: ('Cf', 98), 99: ('Es', 99), 100: ('Fm', 100),
|
|
1733
|
+
101: ('Md', 101), 102: ('No', 102), 103: ('Lr', 103), 104: ('Rf', 104), 105: ('Db', 105),
|
|
1734
|
+
106: ('Sg', 106), 107: ('Bh', 107), 108: ('Hs', 108), 109: ('Mt', 109), 110: ('Ds', 110),
|
|
1735
|
+
111: ('Rg', 111), 112: ('Cn', 112), 113: ('Nh', 113), 114: ('Fl', 114), 115: ('Mc', 115),
|
|
1736
|
+
116: ('Lv', 116), 117: ('Ts', 117), 118: ('Og', 118)
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
# Sample spectral lines for common elements
|
|
1740
|
+
spectral_lines = {
|
|
1741
|
+
'H': [656.3, 486.1, 434.0, 410.2], # Balmer serisi (H-α, H-β, H-γ, H-δ)
|
|
1742
|
+
'He': [587.6, 447.1, 388.9, 402.6], # He I çizgileri (Sarı, Mavi, Mor)
|
|
1743
|
+
'Li': [670.8, 610.4], # Lityum çift çizgisi (Kırmızı)
|
|
1744
|
+
'Be': [313.1, 313.0], # Berilyum UV çizgileri (Yakın UV)
|
|
1745
|
+
'B': [249.7, 249.6], # Bor UV çizgileri
|
|
1746
|
+
'C': [426.7, 505.2, 514.5], # Nötr Karbon (C I) çizgileri
|
|
1747
|
+
'N': [346.6, 357.7, 746.8], # Nötr Azot (N I) çizgileri
|
|
1748
|
+
'O': [777.4, 777.2, 777.5, 844.6], # Nötr Oksijen (O I) triplet ve singlet
|
|
1749
|
+
'F': [685.6, 739.9], # Flor çizgileri
|
|
1750
|
+
'Ne': [540.1, 585.2, 588.2], # Neon çizgileri (Yeşil-Sarı)
|
|
1751
|
+
'Na': [589.0, 589.6], # Sodyum D-çifti (Çok belirgin sarı çizgiler)
|
|
1752
|
+
'Mg': [517.3, 518.4, 457.1], # Magnezyum triplet (Yeşil) ve UV çizgisi
|
|
1753
|
+
'Al': [396.1, 394.4], # Alüminyum çizgileri (Mor)
|
|
1754
|
+
'Si': [390.5, 410.7, 504.1], # Silisyum çizgileri
|
|
1755
|
+
'P': [515.3, 516.7], # Fosfor çizgileri
|
|
1756
|
+
'S': [560.6, 564.0, 869.4], # Kükürt çizgileri
|
|
1757
|
+
'Cl': [837.6, 841.8], # Klor çizgileri (Kırmızı)
|
|
1758
|
+
'Ar': [750.4, 763.5], # Argon çizgileri
|
|
1759
|
+
'K': [766.5, 769.9], # Potasyum çift çizgisi (Kırmızı)
|
|
1760
|
+
'Ca': [393.4, 396.8, 422.7], # Kalsiyum H, K çizgileri (Çok belirgin mor) ve IR çizgisi
|
|
1761
|
+
'Sc': [424.7, 431.9], # Skandiyum çizgileri
|
|
1762
|
+
'Ti': [498.2, 520.2, 533.7], # Titanyum çizgileri
|
|
1763
|
+
'V': [430.5, 437.9], # Vanadyum çizgileri
|
|
1764
|
+
'Cr': [425.4, 427.5, 428.9], # Krom çizgileri
|
|
1765
|
+
'Mn': [403.1, 403.5, 475.4], # Manganez çizgileri
|
|
1766
|
+
'Fe': [438.3, 430.8, 427.2, 527.0], # Demir çizgileri (Fe I - çok sayıda çizgi var, en belirginler)
|
|
1767
|
+
'Co': [412.1, 411.9], # Kobalt çizgileri
|
|
1768
|
+
'Ni': [380.7, 385.7], # Nikel çizgileri
|
|
1769
|
+
'Cu': [510.6, 578.2], # Bakır çizgileri
|
|
1770
|
+
'Zn': [468.0, 472.2], # Çinko çizgileri
|
|
1771
|
+
'Ga': [417.2, 403.3], # Galyum çizgileri
|
|
1772
|
+
'Ge': [422.7, 465.6], # Germanyum çizgileri
|
|
1773
|
+
'As': [488.9, 514.6], # Arsenik çizgileri
|
|
1774
|
+
'Se': [479.6, 486.9], # Selenyum çizgileri
|
|
1775
|
+
'Br': [482.5, 515.8], # Brom çizgileri
|
|
1776
|
+
'Kr': [557.0, 587.1], # Kripton çizgileri
|
|
1777
|
+
'Rb': [780.0, 794.8], # Rubidyum çizgileri (Kırmızı)
|
|
1778
|
+
'Sr': [460.7, 421.6], # Stronsiyum çizgileri
|
|
1779
|
+
'Y': [488.4, 490.0], # İtriyum çizgileri
|
|
1780
|
+
'Zr': [468.8, 473.6], # Zirkonyum çizgileri
|
|
1781
|
+
'Nb': [478.7, 488.6], # Niobyum çizgileri
|
|
1782
|
+
'Mo': [478.5, 480.9], # Molibden çizgileri
|
|
1783
|
+
'Tc': [426.2, 429.6], # Teknesyum (radyoaktif, teorik)
|
|
1784
|
+
'Ru': [449.9, 451.3], # Rutenyum çizgileri
|
|
1785
|
+
'Rh': [450.4, 452.2], # Rodiyum çizgileri
|
|
1786
|
+
'Pd': [468.3, 474.9], # Paladyum çizgileri
|
|
1787
|
+
'Ag': [497.6, 507.6], # Gümüş çizgileri
|
|
1788
|
+
'Cd': [508.6, 643.8], # Kadmiyum çizgileri
|
|
1789
|
+
'In': [451.1, 410.2], # İndiyum çizgileri
|
|
1790
|
+
'Sn': [452.5, 462.4], # Kalay çizgileri
|
|
1791
|
+
'Sb': [451.4, 459.3], # Antimon çizgileri
|
|
1792
|
+
'Te': [460.2, 476.2], # Tellür çizgileri
|
|
1793
|
+
'I': [576.5, 579.3], # İyot çizgileri
|
|
1794
|
+
'Xe': [467.1, 473.4], # Xenon çizgileri
|
|
1795
|
+
'Cs': [852.1, 894.3], # Sezyum çizgileri (Kırmızı-IR)
|
|
1796
|
+
'Ba': [455.4, 493.4], # Baryum çizgileri
|
|
1797
|
+
'La': [463.6, 474.8], # Lantan çizgileri
|
|
1798
|
+
'Ce': [456.2, 458.2], # Seryum çizgileri
|
|
1799
|
+
'Pr': [448.8, 451.0], # Praseodimyum çizgileri
|
|
1800
|
+
'Nd': [451.5, 456.2], # Neodimyum çizgileri
|
|
1801
|
+
'Pm': [446.0, 450.7], # Prometyum (radyoaktif, teorik)
|
|
1802
|
+
'Sm': [442.4, 446.5], # Samaryum çizgileri
|
|
1803
|
+
'Eu': [459.4, 462.7], # Avrupyum çizgileri
|
|
1804
|
+
'Gd': [455.9, 459.4], # Gadolinyum çizgileri
|
|
1805
|
+
'Tb': [455.8, 458.2], # Terbiyum çizgileri
|
|
1806
|
+
'Dy': [455.6, 458.0], # Disprozyum çizgileri
|
|
1807
|
+
'Ho': [455.5, 458.0], # Holmiyum çizgileri
|
|
1808
|
+
'Er': [455.4, 457.9], # Erbiyum çizgileri
|
|
1809
|
+
'Tm': [455.3, 457.7], # Tulyum çizgileri
|
|
1810
|
+
'Yb': [455.2, 457.6], # İterbiyum çizgileri
|
|
1811
|
+
'Lu': [455.1, 457.5], # Lutesyum çizgileri
|
|
1812
|
+
'Hf': [460.5, 462.9], # Hafniyum çizgileri
|
|
1813
|
+
'Ta': [457.8, 460.2], # Tantal çizgileri
|
|
1814
|
+
'W': [460.2, 462.6], # Volfram çizgileri
|
|
1815
|
+
'Re': [460.0, 462.4], # Renyum çizgileri
|
|
1816
|
+
'Os': [459.8, 462.2], # Osmiyum çizgileri
|
|
1817
|
+
'Ir': [459.6, 462.0], # İridyum çizgileri
|
|
1818
|
+
'Pt': [459.4, 461.8], # Platin çizgileri
|
|
1819
|
+
'Au': [479.3, 494.6], # Altın çizgileri
|
|
1820
|
+
'Hg': [435.8, 546.1], # Cıva çizgileri (Mavi-Yeşil)
|
|
1821
|
+
'Tl': [535.0, 537.6], # Talyum çizgileri
|
|
1822
|
+
'Pb': [405.8, 436.3], # Kurşun çizgileri
|
|
1823
|
+
'Bi': [472.2, 474.8], # Bizmut çizgileri
|
|
1824
|
+
'Po': [453.5, 456.0], # Polonyum (radyoaktif, teorik)
|
|
1825
|
+
'At': [452.0, 454.5], # Astatin (radyoaktif, teorik)
|
|
1826
|
+
'Rn': [451.0, 453.5], # Radon (radyoaktif, teorik)
|
|
1827
|
+
'Fr': [450.0, 452.5], # Fransiyum (radyoaktif, teorik)
|
|
1828
|
+
'Ra': [449.0, 451.5], # Radyum (radyoaktif, teorik)
|
|
1829
|
+
'Ac': [448.0, 450.5], # Aktinyum çizgileri
|
|
1830
|
+
'Th': [401.9, 409.5], # Toryum çizgileri
|
|
1831
|
+
'Pa': [451.2, 453.7], # Protaktinyum (radyoaktif, teorik)
|
|
1832
|
+
'U': [424.4, 424.2], # Uranyum çizgileri
|
|
1833
|
+
'Np': [450.0, 452.5], # Neptünyum (radyoaktif, teorik)
|
|
1834
|
+
'Pu': [449.0, 451.5], # Plütonyum (radyoaktif, teorik)
|
|
1835
|
+
'Am': [448.0, 450.5], # Amerikyum (radyoaktif, teorik)
|
|
1836
|
+
'Cm': [447.0, 449.5], # Küriyum (radyoaktif, teorik)
|
|
1837
|
+
'Bk': [446.0, 448.5], # Berkelyum (radyoaktif, teorik)
|
|
1838
|
+
'Cf': [445.0, 447.5], # Kaliforniyum (radyoaktif, teorik)
|
|
1839
|
+
'Es': [444.0, 446.5], # Aynştaynyum (radyoaktif, teorik)
|
|
1840
|
+
'Fm': [443.0, 445.5], # Fermiyum (radyoaktif, teorik)
|
|
1841
|
+
'Md': [442.0, 444.5], # Mendelevyum (radyoaktif, teorik)
|
|
1842
|
+
'No': [441.0, 443.5], # Nobelyum (radyoaktif, teorik)
|
|
1843
|
+
'Lr': [440.0, 442.5], # Lavrensiyum (radyoaktif, teorik)
|
|
1844
|
+
'Rf': [439.0, 441.5], # Rutherfordiyum (teorik)
|
|
1845
|
+
'Db': [438.0, 440.5], # Dubniyum (teorik)
|
|
1846
|
+
'Sg': [437.0, 439.5], # Seaborgiyum (teorik)
|
|
1847
|
+
'Bh': [436.0, 438.5], # Bohriyum (teorik)
|
|
1848
|
+
'Hs': [435.0, 437.5], # Hassiyum (teorik)
|
|
1849
|
+
'Mt': [434.0, 436.5], # Meitneriyum (teorik)
|
|
1850
|
+
'Ds': [433.0, 435.5], # Darmstadtium (teorik)
|
|
1851
|
+
'Rg': [432.0, 434.5], # Roentgenyum (teorik)
|
|
1852
|
+
'Cn': [431.0, 433.5], # Kopernikyum (teorik)
|
|
1853
|
+
'Nh': [430.0, 432.5], # Nihonyum (teorik)
|
|
1854
|
+
'Fl': [429.0, 431.5], # Flerovyum (teorik)
|
|
1855
|
+
'Mc': [428.0, 430.5], # Moskovyum (teorik)
|
|
1856
|
+
'Lv': [427.0, 429.5], # Livermorium (teorik)
|
|
1857
|
+
'Ts': [426.0, 428.5], # Tennessin (teorik)
|
|
1858
|
+
'Og': [425.0, 427.5], # Oganesson (teorik)
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
return periodic_elements, spectral_lines
|
|
1862
|
+
|
|
1584
1863
|
def load_element_data_and_spectral_lines(filename):
|
|
1585
1864
|
"""Loads element data and spectral lines from a text file."""
|
|
1586
1865
|
element_data = {}
|
|
@@ -1654,12 +1933,11 @@ def generate_soft_random_colors(n):
|
|
|
1654
1933
|
"""
|
|
1655
1934
|
colors = []
|
|
1656
1935
|
for _ in range(n):
|
|
1657
|
-
|
|
1658
|
-
hue = random.random() # 0.0 - 1.0 arası
|
|
1936
|
+
hue = random.random()
|
|
1659
1937
|
# Soft görünüm için doygunluk (saturation) orta seviyede
|
|
1660
|
-
saturation = 0.4 + (random.random() * 0.4)
|
|
1938
|
+
saturation = 0.4 + (random.random() * 0.4)
|
|
1661
1939
|
# Soft görünüm için parlaklık (value) yüksek
|
|
1662
|
-
value = 0.7 + (random.random() * 0.3)
|
|
1940
|
+
value = 0.7 + (random.random() * 0.3)
|
|
1663
1941
|
from matplotlib.colors import hsv_to_rgb
|
|
1664
1942
|
rgb = hsv_to_rgb([hue, saturation, value])
|
|
1665
1943
|
colors.append(rgb)
|
|
@@ -2265,3 +2543,6 @@ if __name__ == '__main__':
|
|
|
2265
2543
|
|
|
2266
2544
|
|
|
2267
2545
|
|
|
2546
|
+
|
|
2547
|
+
|
|
2548
|
+
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "kececilayout"
|
|
9
|
-
version = "0.5.
|
|
9
|
+
version = "0.5.8"
|
|
10
10
|
|
|
11
11
|
# Diğer proje bilgileri (isteğe bağlı ama tavsiye edilir)
|
|
12
12
|
authors = [
|
|
@@ -78,3 +78,5 @@ configuration = "docs/conf.py" # Build konfigürasyonu belirtin
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
81
|
+
|
|
82
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[tox:tox]
|
|
2
|
+
requires =
|
|
3
|
+
tox >= 4.0
|
|
4
|
+
env_list =
|
|
5
|
+
3.15
|
|
6
|
+
3.14t
|
|
7
|
+
3.14
|
|
8
|
+
3.13
|
|
9
|
+
3.12
|
|
10
|
+
3.11
|
|
11
|
+
type
|
|
12
|
+
|
|
13
|
+
[testenv]
|
|
14
|
+
deps = pytest
|
|
15
|
+
commands = pytest tests
|
|
16
|
+
|
|
17
|
+
[testenv:type]
|
|
18
|
+
deps = mypy
|
|
19
|
+
commands = mypy src
|
|
20
|
+
|
|
21
|
+
[egg_info]
|
|
22
|
+
tag_build =
|
|
23
|
+
tag_date = 0
|
|
24
|
+
|
kececilayout-0.5.6/setup.cfg
DELETED
|
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
|