Skip to content

Commit

Permalink
No contrast stretching for Half FFT
Browse files Browse the repository at this point in the history
  • Loading branch information
blleng committed Sep 11, 2024
1 parent 4161b50 commit 2d1decd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/convert_emd/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def convert_emd(file_name, data, output_type, scale_bar, sb_color, sb_x_start, s
eds_color[title] = default_colors[ele]
ele += 1
if ele > 9: ele = 0

is_complex = True if frame["data"].dtype == "complex64" else False
if is_complex:
idata = [frame["data"].real, frame["data"].imag]
else: idata = [frame["data"]]

for j in range(len(idata)):
if is_complex: idata[j] = emdfun.contrast_stretch(idata[j], stretch)
if not is_complex: idata[j] = emdfun.contrast_stretch(idata[j], stretch)
cmp = "gray"
size_x, size_y = emdfun.get_size(frame)
plt.figure(figsize=(size_x/100, size_y/100), facecolor="black")
Expand Down

0 comments on commit 2d1decd

Please sign in to comment.