Skip to content

Commit d0449c2

Browse files
authored
Merge pull request #230 from pycroscopy/plotly-support
Plotly support
2 parents eae71f4 + d5a0fce commit d0449c2

19 files changed

+5585
-1524
lines changed

notebooks/Imaging/Adaptive_Fourier_Filter.ipynb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
},
102102
{
103103
"cell_type": "code",
104-
"execution_count": 2,
104+
"execution_count": null,
105105
"metadata": {
106106
"ExecuteTime": {
107107
"end_time": "2024-01-28T17:26:31.896075100Z",
@@ -135,15 +135,9 @@
135135
"\n",
136136
"import sys\n",
137137
"sys.path.insert(0, '../../')\n",
138-
"sys.path.insert(0, '../../../sipdy/')\n",
139-
"sys.path.insert(0, '../../../SciFiReaders/')\n",
140-
"\n",
141138
"\n",
142139
"%load_ext autoreload\n",
143140
"%autoreload 2\n",
144-
"import SciFiReaders\n",
145-
"import sidpy\n",
146-
"\n",
147141
"import pyTEMlib\n",
148142
"\n",
149143
"\n",

notebooks/Imaging/D1-Diffraction_Rings.ipynb

Lines changed: 1688 additions & 0 deletions
Large diffs are not rendered by default.

notebooks/Imaging/D2-Diffraction_Spots.ipynb

Lines changed: 1929 additions & 0 deletions
Large diffs are not rendered by default.
28.1 KB
Loading

notebooks/Spectroscopy/EDS-SI.ipynb

Lines changed: 180 additions & 102 deletions
Large diffs are not rendered by default.

notebooks/Spectroscopy/EDS.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@
893893
],
894894
"metadata": {
895895
"kernelspec": {
896-
"display_name": "base",
896+
"display_name": "Python 3 (ipykernel)",
897897
"language": "python",
898898
"name": "python3"
899899
},

notebooks/usefull_equations.ipynb

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,10 @@
3232
"id": "b468443b",
3333
"metadata": {},
3434
"outputs": [
35-
{
36-
"name": "stdout",
37-
"output_type": "stream",
38-
"text": [
39-
"using config dir\n",
40-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data fluorescent_yield.csv\n",
41-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data fluorescent_yield.xlsx\n",
42-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data k_factors_Bruker_15keV.json\n",
43-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data k_factors_Thermo_200keV.json\n",
44-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data xrays_X_section_100kV.json\n",
45-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data xrays_X_section_200kV.json\n",
46-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data xrays_X_section_300kV.json\n",
47-
"c:\\Users\\gduscher\\AppData\\Local\\anaconda3\\Lib\\site-packages\\pyTEMlib\\data xrays_X_section_60kV.json\n"
48-
]
49-
},
5035
{
5136
"data": {
5237
"text/plain": [
53-
"'0.2025.11.3'"
38+
"'0.2025.12.0'"
5439
]
5540
},
5641
"execution_count": 1,
@@ -65,7 +50,7 @@
6550
"import scipy \n",
6651
"\n",
6752
"import pyTEMlib\n",
68-
"pyTEMlib.__version__\n"
53+
"pyTEMlib.__version__"
6954
]
7055
},
7156
{
@@ -85,15 +70,15 @@
8570
},
8671
{
8772
"cell_type": "code",
88-
"execution_count": null,
73+
"execution_count": 2,
8974
"id": "35a6b103",
9075
"metadata": {},
9176
"outputs": [
9277
{
9378
"name": "stdout",
9479
"output_type": "stream",
9580
"text": [
96-
"wavelength is 1.97 pm for 300 keV\n"
81+
"wavelength is 4.87 pm for 60 keV\n"
9782
]
9883
}
9984
],
@@ -127,7 +112,7 @@
127112
},
128113
{
129114
"cell_type": "code",
130-
"execution_count": 13,
115+
"execution_count": 3,
131116
"id": "e8dfa007",
132117
"metadata": {},
133118
"outputs": [
@@ -138,7 +123,8 @@
138123
"Help on function get_wavelength in module __main__:\n",
139124
"\n",
140125
"get_wavelength(e0: float) -> float\n",
141-
" get deBroglie wavelength of electron accelerated by energy (in eV) e0\n",
126+
" get deBroglie wavelength of electron accelerated by energy e0 (in eV)\n",
127+
"\n",
142128
" Parameters\n",
143129
" ----------\n",
144130
" e0 : float\n",

pyTEMlib/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
from . import eels_tools
2424
from . import eds_tools
2525
from . import crystal_tools
26-
from . import kinematic_scattering
27-
from . import dynamic_scattering
26+
from . import diffraction_tools
2827
from .config_dir import config_path
2928
from . import utilities
3029
from . import xrpa_x_sections
3130

3231
__all__ = ['__version__', 'file_tools', 'image_tools', 'atom_tools',
3332
'graph_tools', 'probe_tools', 'eels_tools', 'eds_tools',
34-
'crystal_tools', 'kinematic_scattering', 'dynamic_scattering',
35-
'config_path', 'utilities', 'xrpa_x_sections']
33+
'crystal_tools', 'diffraction_tools', 'xrpa_x_sections',
34+
'config_path', 'utilities']
3635
__author__ = 'Gerd Duscher'
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
""" diffraction tools subpackage
2+
A collection of tools to analyze diffraction data
3+
part of pyTEMlib
4+
author: Gerd Duscher, UTK"""
5+
6+
from .basic import read_poscar, example, zone_mistilt, check_sanity
7+
from .basic import make_pretty_labels, get_all_miller_indices
8+
from .basic import get_wavelength, get_metric_tensor, get_structure_factors
9+
from .basic import find_nearest_zone_axis, find_angles, stage_rotation_matrix
10+
from .basic import get_zone_rotation, scattering_matrix, gaussian, get_unit_cell
11+
from .basic import output_verbose, feq, form_factor
12+
13+
from .kinematic import kinematic_scattering
14+
from .kinematic import calculate_kikuchi, calculate_holz
15+
from .kinematic import calculate_laue_zones, center_of_laue_circle
16+
from .kinematic import get_bragg_reflections, get_incident_wave_vector
17+
from .kinematic import get_dynamically_activated, ring_pattern_calculation, get_reflection_families
18+
from .kinematic import get_allowed_reflections, get_all_reflections
19+
20+
from .diffraction_plot import plot_diffraction_pattern, plot_ring_pattern, warp
21+
from .diffraction_plot import plot_saed_parameter, plot_cbed_parameter, plot_holz_parameter
22+
from .diffraction_plot import plot_kikuchi, plot_reciprocal_unit_cell_2d
23+
from .diffraction_plot import scattering_profiles, set_center
24+
25+
26+
__all__ = ['read_poscar', 'example', 'zone_mistilt', 'check_sanity',
27+
'make_pretty_labels', 'get_all_miller_indices', 'get_wavelength',
28+
'get_metric_tensor', 'get_structure_factors', 'find_nearest_zone_axis',
29+
'find_angles', 'stage_rotation_matrix', 'get_zone_rotation', 'scattering_matrix',
30+
'gaussian', 'get_unit_cell', 'output_verbose', 'feq', 'form_factor',
31+
'kinematic_scattering', 'calculate_kikuchi', 'calculate_holz', 'get_dynamically_activated',
32+
'calculate_laue_zones', 'center_of_laue_circle', 'get_bragg_reflections',
33+
'get_incident_wave_vector', 'ring_pattern_calculation', get_all_reflections,
34+
'get_reflection_families', 'get_allowed_reflections',
35+
'plot_diffraction_pattern', 'plot_ring_pattern', 'warp',
36+
'plot_saed_parameter', 'plot_cbed_parameter', 'plot_holz_parameter',
37+
'plot_kikuchi', 'plot_reciprocal_unit_cell_2d', 'scattering_profiles',
38+
'set_center']

0 commit comments

Comments
 (0)