Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion notebooks/Diffraction/D1_Diffraction_Rings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
" version = '-1'\n",
" return version\n",
"\n",
"if test_package('pyTEMlib') < '0.2025.12.0':\n",
"if test_package('pyTEMlib') < '0.2026.06.0':\n",
" print('installing pyTEMlib')\n",
" !{sys.executable} -m pip install git+https://github.com/pycroscopy/pyTEMlib.git@main -q --upgrade\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/Introduction/1_Installation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
" version = '-1'\n",
" return version\n",
"\n",
"if test_package('pyTEMlib') < '0.2025.12.1':\n",
"if test_package('pyTEMlib') < '0.2026.06.0':\n",
" print('installing pyTEMlib')\n",
" !{sys.executable} -m pip install --upgrade pyTEMlib -q\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/Introduction/2_Open_Files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
" version = '-1'\n",
" return version\n",
"\n",
"if test_package('pyTEMlib') < '0.2025.12.1':\n",
"if test_package('pyTEMlib') < '0.2026.06.0':\n",
" print('installing pyTEMlib')\n",
" !{sys.executable} -m pip install --upgrade pyTEMlib -q\n",
"\n",
Expand Down
3,572 changes: 432 additions & 3,140 deletions notebooks/Spectroscopy/S2-Analyse_CoreLoss_EELS.ipynb

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions pyTEMlib/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def effective_collection_angle(energy_scale: np.ndarray,
#
"""
z1 = beam_ev # eV
z2 = energy_scale[0]
z2 = np.max([energy_scale[0], 1.0])
z3 = energy_scale[-1]
z4 = 100.0
z5 = alpha*0.001 # rad
Expand All @@ -191,11 +191,11 @@ def effective_collection_angle(energy_scale: np.ndarray,
for zx in range(int(z2),int(z3),int(z4)): #! zx = current energy loss
eta=0.0;
x0=float(zx)*(z1+511060.)/(z1*(z1+1022120.)); # x0 = relativistic theta-e
x1 = np.pi/(2.*x0);
x2=x0*x0+z5*z5;
x3=z5/x0*z5/x0;
x4=0.1*np.sqrt(x2);
dtheta=(z6-x4)/z7;
x1 = np.pi/(2.*x0)
x2=x0*x0+z5*z5
x3=z5/x0*z5/x0
x4=0.1*np.sqrt(x2)
dtheta=(z6-x4)/z7
#
# calculation of the analytical expression
#
Expand Down Expand Up @@ -225,10 +225,9 @@ def effective_collection_angle(energy_scale: np.ndarray,
#
# calculation of beta *
#
x6=np.power((1.+x1*x1),eta);
x7=x0*np.sqrt(x6-1.);
y=x7*1000.;

x6=np.power((1.+x1*x1),eta)
x7=x0*np.sqrt(x6-1.)
y=x7*1000.

return y

Expand Down
Loading