KullmannLab / pyecog2

PyEcog2 is a python software package aimed at exploring, visualizing and analyzing (video) EEG telemetry data
GNU General Public License v3.0
4 stars 0 forks source link

shift select #20

Closed mikailweston closed 3 years ago

mikailweston commented 3 years ago

using shift select for both start and end of selection leads to programme hanging:

shift-left click to select start of annotation

-> skip to another distant file

-> shift select to select start of new annotation (without ending first annotation selection)

programme then adds all files in between to buffer: this may be hundreds of files

mfpleite commented 3 years ago

Well caught. The problem is probably that we try to compute FFTs and Wavelets for the whole window. I am going to add a safeguard to avoid computing FFTs and Wavelets for windows larger than one hour.

mikailweston commented 3 years ago

I think an hour is still too much especially for 10KHz sample rate, is there a way of stopping the computation. I think a check box to optionally enable fft and wavelet when needed would be useful for annotating long events.

Thanks

On Fri, 19 Mar 2021, 13:54 mfpleite, @.***> wrote:

Well caught. The problem is probably that we try to compute FFTs and Wavelets for the whole window. I am going to add a safeguard to avoid computing FFTs and Wavelets for windows larger than one hour.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KullmannLab/pyecog2/issues/20#issuecomment-802850479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB342OO6HIQGOULASR5IJ6DTENJTFANCNFSM4ZNFVERQ .

mfpleite commented 3 years ago

If the FFT and Wavelet subwindows are closed they are not computed - that is a way to manually get rid of the problem. The Wavelet computation runs in a different thread other than the main program, so it is a bit more well behaved in these situations. I didn't bother to thread the FFT because it is generally fast.

The file buffer problem arises just with H5 files I think, because you actually try to load all the data into memory. If you are using binary files, they are just memory mapped and the buffer only puts the data into memory when needed. I included a maximum of 1GB for the data in buffer, but it fails in a bit of a clumsy way... it should be sufficient to avoid catastrphic RAM shortages though. 1 hr of 10KHz data single channel is just 144MB, and I think we never load full data for multiple channels, so I think we should be good with the fixes of latest commit.

mfpleite commented 3 years ago

@mikailweston can we close this issue?

mikailweston commented 3 years ago

yes, works very well. thanks