pyTEMlib 0.2025.4.2__py3-none-any.whl → 0.2025.9.1__py3-none-any.whl
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.
Potentially problematic release.
This version of pyTEMlib might be problematic. Click here for more details.
- build/lib/pyTEMlib/__init__.py +33 -0
- build/lib/pyTEMlib/animation.py +640 -0
- build/lib/pyTEMlib/atom_tools.py +238 -0
- build/lib/pyTEMlib/config_dir.py +31 -0
- build/lib/pyTEMlib/crystal_tools.py +1219 -0
- build/lib/pyTEMlib/diffraction_plot.py +756 -0
- build/lib/pyTEMlib/dynamic_scattering.py +293 -0
- build/lib/pyTEMlib/eds_tools.py +826 -0
- build/lib/pyTEMlib/eds_xsections.py +432 -0
- build/lib/pyTEMlib/eels_tools/__init__.py +44 -0
- build/lib/pyTEMlib/eels_tools/core_loss_tools.py +751 -0
- build/lib/pyTEMlib/eels_tools/eels_database.py +134 -0
- build/lib/pyTEMlib/eels_tools/low_loss_tools.py +655 -0
- build/lib/pyTEMlib/eels_tools/peak_fit_tools.py +175 -0
- build/lib/pyTEMlib/eels_tools/zero_loss_tools.py +264 -0
- build/lib/pyTEMlib/file_reader.py +274 -0
- build/lib/pyTEMlib/file_tools.py +811 -0
- build/lib/pyTEMlib/get_bote_salvat.py +69 -0
- build/lib/pyTEMlib/graph_tools.py +1153 -0
- build/lib/pyTEMlib/graph_viz.py +599 -0
- build/lib/pyTEMlib/image/__init__.py +37 -0
- build/lib/pyTEMlib/image/image_atoms.py +270 -0
- build/lib/pyTEMlib/image/image_clean.py +197 -0
- build/lib/pyTEMlib/image/image_distortion.py +299 -0
- build/lib/pyTEMlib/image/image_fft.py +277 -0
- build/lib/pyTEMlib/image/image_graph.py +926 -0
- build/lib/pyTEMlib/image/image_registration.py +316 -0
- build/lib/pyTEMlib/image/image_utilities.py +309 -0
- build/lib/pyTEMlib/image/image_window.py +421 -0
- build/lib/pyTEMlib/image_tools.py +699 -0
- build/lib/pyTEMlib/interactive_image.py +1 -0
- build/lib/pyTEMlib/kinematic_scattering.py +1196 -0
- build/lib/pyTEMlib/microscope.py +61 -0
- build/lib/pyTEMlib/probe_tools.py +906 -0
- build/lib/pyTEMlib/sidpy_tools.py +153 -0
- build/lib/pyTEMlib/simulation_tools.py +104 -0
- build/lib/pyTEMlib/test.py +437 -0
- build/lib/pyTEMlib/utilities.py +314 -0
- build/lib/pyTEMlib/version.py +5 -0
- build/lib/pyTEMlib/xrpa_x_sections.py +20976 -0
- pyTEMlib/__init__.py +25 -3
- pyTEMlib/animation.py +31 -22
- pyTEMlib/atom_tools.py +29 -34
- pyTEMlib/config_dir.py +2 -28
- pyTEMlib/crystal_tools.py +129 -165
- pyTEMlib/eds_tools.py +559 -342
- pyTEMlib/eds_xsections.py +432 -0
- pyTEMlib/eels_tools/__init__.py +44 -0
- pyTEMlib/eels_tools/core_loss_tools.py +751 -0
- pyTEMlib/eels_tools/eels_database.py +134 -0
- pyTEMlib/eels_tools/low_loss_tools.py +655 -0
- pyTEMlib/eels_tools/peak_fit_tools.py +175 -0
- pyTEMlib/eels_tools/zero_loss_tools.py +264 -0
- pyTEMlib/file_reader.py +274 -0
- pyTEMlib/file_tools.py +260 -1130
- pyTEMlib/get_bote_salvat.py +69 -0
- pyTEMlib/graph_tools.py +101 -174
- pyTEMlib/graph_viz.py +150 -0
- pyTEMlib/image/__init__.py +37 -0
- pyTEMlib/image/image_atoms.py +270 -0
- pyTEMlib/image/image_clean.py +197 -0
- pyTEMlib/image/image_distortion.py +299 -0
- pyTEMlib/image/image_fft.py +277 -0
- pyTEMlib/image/image_graph.py +926 -0
- pyTEMlib/image/image_registration.py +316 -0
- pyTEMlib/image/image_utilities.py +309 -0
- pyTEMlib/image/image_window.py +421 -0
- pyTEMlib/image_tools.py +154 -928
- pyTEMlib/kinematic_scattering.py +1 -1
- pyTEMlib/probe_tools.py +1 -1
- pyTEMlib/test.py +437 -0
- pyTEMlib/utilities.py +314 -0
- pyTEMlib/version.py +2 -3
- pyTEMlib/xrpa_x_sections.py +14 -10
- {pytemlib-0.2025.4.2.dist-info → pytemlib-0.2025.9.1.dist-info}/METADATA +13 -16
- pytemlib-0.2025.9.1.dist-info/RECORD +86 -0
- {pytemlib-0.2025.4.2.dist-info → pytemlib-0.2025.9.1.dist-info}/WHEEL +1 -1
- pytemlib-0.2025.9.1.dist-info/top_level.txt +6 -0
- pyTEMlib/core_loss_widget.py +0 -721
- pyTEMlib/eels_dialog.py +0 -754
- pyTEMlib/eels_dialog_utilities.py +0 -1199
- pyTEMlib/eels_tools.py +0 -2359
- pyTEMlib/file_tools_qt.py +0 -193
- pyTEMlib/image_dialog.py +0 -158
- pyTEMlib/image_dlg.py +0 -146
- pyTEMlib/info_widget.py +0 -1086
- pyTEMlib/info_widget3.py +0 -1120
- pyTEMlib/low_loss_widget.py +0 -479
- pyTEMlib/peak_dialog.py +0 -1129
- pyTEMlib/peak_dlg.py +0 -286
- pytemlib-0.2025.4.2.dist-info/RECORD +0 -38
- pytemlib-0.2025.4.2.dist-info/top_level.txt +0 -1
- {pytemlib-0.2025.4.2.dist-info → pytemlib-0.2025.9.1.dist-info}/entry_points.txt +0 -0
- {pytemlib-0.2025.4.2.dist-info → pytemlib-0.2025.9.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
""" Convert Bote and Salvat cross sections to json format
|
|
2
|
+
Data from: Bote and Salvat (1998) Atomic Data and Nuclear Data Tables 71, 1-15
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import json
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
|
|
12
|
+
sys.path.insert(0, './')
|
|
13
|
+
import pyTEMlib
|
|
14
|
+
print(pyTEMlib.__version__)
|
|
15
|
+
|
|
16
|
+
def write_bote_salvat_json():
|
|
17
|
+
""" Convert Bote and Salvat cross sections to json format"""
|
|
18
|
+
line = 'not empty'
|
|
19
|
+
x_sec = {}
|
|
20
|
+
with open('.//data//Bote_Salvat.txt', 'r', encoding='utf-8') as f:
|
|
21
|
+
while line:
|
|
22
|
+
line = f.readline()
|
|
23
|
+
if 'BoteSalvatElementDatum' in line:
|
|
24
|
+
ele = line.split('[')
|
|
25
|
+
z = int(ele[0].split('(')[1][:-2])
|
|
26
|
+
be = []
|
|
27
|
+
for value in ele[1].split(']')[0].split(','):
|
|
28
|
+
be.append(float(value))
|
|
29
|
+
x_sec[z]= {'Be': be}
|
|
30
|
+
current_x = x_sec[z]
|
|
31
|
+
else:
|
|
32
|
+
if 'Anlj' not in current_x.keys():
|
|
33
|
+
alij = []
|
|
34
|
+
for value in line.split('[')[1].split(']')[0].split(','):
|
|
35
|
+
alij.append(float(value))
|
|
36
|
+
current_x['Anlj'] = alij
|
|
37
|
+
elif 'G' not in current_x.keys():
|
|
38
|
+
g = []
|
|
39
|
+
gg = []
|
|
40
|
+
g_lines =line.split('[')[1].split(']')[0].split(';')
|
|
41
|
+
for g_line in g_lines:
|
|
42
|
+
g = []
|
|
43
|
+
for value in g_line.split(' '):
|
|
44
|
+
if value != '':
|
|
45
|
+
g.append(float(value))
|
|
46
|
+
gg.append(g)
|
|
47
|
+
current_x['G'] = gg
|
|
48
|
+
elif 'edge' not in current_x.keys():
|
|
49
|
+
edge = []
|
|
50
|
+
for value in line.split('[')[1].split(']')[0].split(','):
|
|
51
|
+
edge.append(float(value))
|
|
52
|
+
current_x['edge'] = edge
|
|
53
|
+
elif 'A' not in current_x.keys():
|
|
54
|
+
a = []
|
|
55
|
+
aa = []
|
|
56
|
+
a_lines =line.split('[')[1].split(']')[0].split(';')
|
|
57
|
+
for a_line in a_lines:
|
|
58
|
+
a = []
|
|
59
|
+
for value in a_line.split(' '):
|
|
60
|
+
if value != '':
|
|
61
|
+
a.append(float(value))
|
|
62
|
+
aa.append(a)
|
|
63
|
+
current_x['A'] = aa
|
|
64
|
+
for key, value in x_sec[3].items():
|
|
65
|
+
print(key, np.array(value))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
file_name_out = os.path.join(pyTEMlib.config_path, 'Bote_Salvat.json')
|
|
69
|
+
json.dump(x_sec, open(file_name_out, 'w', encoding='utf-8'), indent=4)
|