Skip to content

Commit

Permalink
unify with .get_spectral_dims(return_axis=True)[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoust17 committed Oct 30, 2024
1 parent d09716d commit 50b7b9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pyTEMlib/eds_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_x_ray_lines(spectrum, elements):
# omega_K = Z**4/(alpha_K+Z**4)
# omega_L = Z**4/(alpha_L+Z**4)
# omega_M = Z**4/(alpha_M+Z**4)
energy_scale = spectrum.energy_scale
energy_scale = spectrum.get_spectral_dims(return_axis=True)[0]
for element in elements:
atomic_number = elements_list.index(element)
out_tags[element] ={'Z': atomic_number}
Expand Down Expand Up @@ -314,7 +314,7 @@ def get_peak(E, energy_scale):

def initial_model_parameter(spectrum):
tags = spectrum.metadata['EDS']['lines']
energy_scale = spectrum.energy_scale
energy_scale = spectrum.get_spectral_dims(return_axis=True)[0]
p = []
peaks = []
keys = []
Expand Down Expand Up @@ -385,7 +385,7 @@ def get_model(spectrum, start=100):
def fit_model(spectrum, elements, use_detector_efficiency=False):
out_tags = get_x_ray_lines(spectrum, elements)
peaks, pin, keys = initial_model_parameter(spectrum)
energy_scale = energy_scale = spectrum.energy_scale
energy_scale = energy_scale = spectrum.get_spectral_dims(return_axis=True)[0]

if 'detector' in spectrum.metadata['experiment'].keys():
if 'start_channel' not in spectrum.metadata['experiment']['detector']:
Expand Down
2 changes: 1 addition & 1 deletion pyTEMlib/file_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

# Austin commented the line below - it is not used anywhere in the code, and it gives import errors 9-14-2024
# get_slope = sidpy.base.num_utils.get_slopes
__version__ = '2022.3.3'
__version__ = '2024.9.14'

from traitlets import Unicode, Bool, validate, TraitError
import ipywidgets
Expand Down

0 comments on commit 50b7b9d

Please sign in to comment.