Normalize projection images to max value of 1000

This commit is contained in:
usov_i 2021-08-24 14:30:16 +02:00
parent 5c4362d984
commit 5de09d16ca
2 changed files with 12 additions and 2 deletions

View File

@ -246,6 +246,11 @@ def create():
overview_x = np.mean(h5_data, axis=1)
overview_y = np.mean(h5_data, axis=2)
# normalize for simpler colormapping
overview_max_val = max(np.max(overview_x), np.max(overview_y))
overview_x = 1000 * overview_x / overview_max_val
overview_y = 1000 * overview_y / overview_max_val
overview_plot_x_image_source.data.update(image=[overview_x], dw=[n_x], dh=[n_im])
overview_plot_y_image_source.data.update(image=[overview_y], dw=[n_y], dh=[n_im])
@ -381,7 +386,7 @@ def create():
colormap.on_change("value", colormap_callback)
colormap.value = "plasma"
PROJ_STEP = 0.1
PROJ_STEP = 1
def proj_auto_checkbox_callback(state):
if state:

View File

@ -147,6 +147,11 @@ def create():
overview_x = np.mean(h5_data, axis=1)
overview_y = np.mean(h5_data, axis=2)
# normalize for simpler colormapping
overview_max_val = max(np.max(overview_x), np.max(overview_y))
overview_x = 1000 * overview_x / overview_max_val
overview_y = 1000 * overview_y / overview_max_val
overview_plot_x_image_source.data.update(image=[overview_x], dw=[n_x], dh=[n_im])
overview_plot_y_image_source.data.update(image=[overview_y], dw=[n_y], dh=[n_im])
@ -536,7 +541,7 @@ def create():
)
display_min_spinner.on_change("value", display_min_spinner_callback)
PROJ_STEP = 0.1
PROJ_STEP = 1
def proj_auto_checkbox_callback(state):
if state: