hyperspyUI icon indicating copy to clipboard operation
hyperspyUI copied to clipboard

ZLP alignment very slow

Open thomasaarholt opened this issue 8 years ago • 6 comments

I thought this might be a hyperspy and matplotlib-backend related issue, but perhaps not.

Trying zlp alignment in HyperspyUI (using the console) is extremely slow - I think this is due to the matplotlib backend, although I'm not sure why. @andyroo and I discovered that there was a big time delay on align1D depending if one was in inline or qt4. The following 1.8 GB lowloss image takes 1.5 min to align in normal hyperspy (inline). Hyperspyui estimates 91 hours. This is with the "view" of the SI off. Typing %matplotlib inline in the UI console makes the images dissappear, but the alignment takes the same amount of time.

thomasaarholt avatar Dec 08 '16 16:12 thomasaarholt

I'm going to assume that it tries to plot during fitting of the ZLP. Try suppressing plotting calls from events temporarily during plotting, to see if that has an effect.

vidartf avatar Dec 08 '16 18:12 vidartf

Whatever you've done over the past month has improved the situation, but it is still about 30 times faster in hs than in the UI.

An oddity is that the three-stage zlp alignment with subpixel correction takes 5 sec, 13 sec and 5 sec for each stage in hyperspy, but 1.5min, 0.5min and 7.5 min in the UI.

Looks like there's something happening with the first and last process that takes a long time in the UI whilst the middle process has fewer things slowing it down in the UI.

thomasaarholt avatar Jan 18 '17 14:01 thomasaarholt

There is not really anything that the UI should do to slow this down. Are you using the qt4 backend in normal hyperspy? That should be the same speed as int the UI.

vidartf avatar Jan 18 '17 15:01 vidartf

I think it might be related to the progress bar code. I'll I've at least been able to reproduce it locally, and will have a look.

vidartf avatar Jan 23 '17 18:01 vidartf

Nice and fast now.

thomasaarholt avatar Apr 21 '17 09:04 thomasaarholt

I haven't done anything, so why does it currently work?

vidartf avatar Apr 21 '17 09:04 vidartf