Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Viewer Intensity Profile not working with slow/faulty images #2487

Open
MikeSullivan7 opened this issue Jan 29, 2025 · 0 comments · May be fixed by #2488
Open

Live Viewer Intensity Profile not working with slow/faulty images #2487

MikeSullivan7 opened this issue Jan 29, 2025 · 0 comments · May be fixed by #2488
Assignees

Comments

@MikeSullivan7
Copy link
Collaborator

Summary

When transferring images to the Live Viewer path, if the images are arriving slowly or are corrupt, then the Intensity in the Live Viewer is not displayed correctly, with errors around loading of files.

Steps To Reproduce

Open Live Viewer with the Intensity Plot activated.

Run the simulator with slow mode and tiff files

python scripts/simulate_live_data.py -s /data/imaging/tof/MCP_Fe_Calibration/Fe_Powder_Run1_PH60_Dis50mm_NewShutter/Corrected/ -d /tmp/live_test/ -r 1 --mode slow

(with the paths replaced with the locations on your system)

Current Behaviour

When the corrupt image is displayed, an error dialog pops up and the intensity plot does not display correctly

Expected Behaviour

The intensity plot should behave as expected, ignoring when partial or faulty images arrive.

Failure Logs

2025-01-28 10:55:38,833 [tifffile.tifffile:L23579] WARNING: <tifffile.TiffPages @8388616> invalid offset to first page 8388616
2025-01-28 10:55:38,833 [mantidimaging.gui.windows.main.view:L562] ERROR: Traceback (most recent call last):
  File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/live_viewer/model.py", line 174, in _handle_image_changed_in_list
    self.presenter.update_image_list(image_files)
  File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/live_viewer/presenter.py", line 118, in update_image_list
    self.model.add_mean(images_list[-1], image_data)
  File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/live_viewer/model.py", line 191, in add_mean
    mean_to_add = np.mean(image_array[top:bottom, left:right])
                          ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

Screenshot(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant