Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit aaff6032 authored by usov_i's avatar usov_i
Browse files

Allow single frame in hdf_viewer

parent 3fb3fe57
No related branches found
No related tags found
No related merge requests found
......@@ -115,9 +115,15 @@ def create():
print("Could not read data from the file.")
return
last_im_index = det_data["data"].shape[0] - 1
index_spinner.value = 0
index_spinner.high = det_data["data"].shape[0] - 1
index_slider.end = det_data["data"].shape[0] - 1
index_spinner.high = last_im_index
if last_im_index == 0:
index_slider.disabled = True
else:
index_slider.disabled = False
index_slider.end = last_im_index
zebra_mode = det_data["zebra_mode"]
if zebra_mode == "nb":
......@@ -253,7 +259,7 @@ def create():
var = det_data[scan_motor]
var_start = var[0]
var_end = var[-1] + (var[-1] - var[0]) / (n_im - 1)
var_end = var[-1] + (var[-1] - var[0]) / (n_im - 1) if n_im != 1 else var_start + 1
scanning_motor_range.start = var_start
scanning_motor_range.end = var_end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment