Skip to content

Commit

Permalink
Merge branch 'release-0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
blleng committed Sep 9, 2024
2 parents 9b75b1d + 50d9aea commit 112dfdd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "convert-emd"
version = "0.2.0"
version = "0.2.2"
dependencies = ["rosettasciio[all]>=0.6"]
authors = [
{ name="Bing-Liang Leng", email="leng.bl@sjtu.edu.cn" },
Expand Down
4 changes: 2 additions & 2 deletions src/convert_emd/cemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ def main():

file_name = args.file
data = emdfun.get_data(file_name)
eds = emdfun.is_eds(data)
output_type = "." + args.out

if args.no_scale:
Expand All @@ -29,7 +28,8 @@ def main():
ele_color = ele + 1
eds_color[args.eds[ele]] = args.eds[ele_color]
all_elements = emdfun.eds_elements(data)
if eds and len(all_elements):
mapping_overlay = []
if len(all_elements):
mapping_overlay = args.overlay if len(args.overlay) else all_elements
overlay = True
else:
Expand Down
9 changes: 5 additions & 4 deletions src/convert_emd/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ def is_eds_spectrum(frame):

def eds_elements(data):
element = []
for i in range(len(data)):
if data_signal_type(data[i]) == "":
element.append(get_title(data[i]))
if len(element) > 0: element.remove("HAADF")
if is_eds(data):
for i in range(len(data)):
if data_signal_type(data[i]) == "":
element.append(get_title(data[i]))
if len(element) > 0: element.remove("HAADF")
return element

def get_scale(frame):
Expand Down

0 comments on commit 112dfdd

Please sign in to comment.