-
Notifications
You must be signed in to change notification settings - Fork 15
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
Loading a signal lazily #127
Comments
In older versions of HyperSpyUI, this is possible by changing the HyperSpy preference to use lazy loading by default. BTW: What does HyperSpy do for the navigation plot of lazy signals? The signals in the UI are always plotted, so if the plotting loads the entire signal into memory to calculate the navigator, this will not really be useful here... |
Also, I made a quick implementation locally, and trying to open a signal of 500MB seems to take forever and a lot of CPU (and memory usage of 500MB+ at some point). Any idea why? |
The navigator is computed lazily i.e. the chunks are retrieved from the file, processed and deleted from memory. Still, it will obviously take time and CPU. For large signals it's usually better not to plot the navigator or to use another image as navigator if possible. In hyperspy/hyperspy#1544 the traitsui loading widget now has a lazy checkbox. |
I also noticed that the UI's contrast controls call max/min every time a figure is activated, which will of course be expensive for navigator plots (it uses So lazy load in the UI should maybe only use navigator sliders then? Or put up an (optional?) dialog box asking what to do for navigator (e.g. sliders, another already loaded signal, another file, or just the standard calculated image). |
The second option (dialog box) sounds good! The first one can be very limiting in some cases. |
Is this something that would be easy to add back as an option. It would be nice to include this for checking 4D datasets after aqusition on a microscope. |
Currently HyperSpy supports Lazy loading, however I don't think there is a way of specifying a file to be loaded lazily in HyperSpyUI.
This would be useful for loading very large datasets, which normally would exceed the available memory on most computers.
The text was updated successfully, but these errors were encountered: