visbrain
visbrain copied to clipboard
PSD in scored sleep data so in SLEEP module
Hi! I have been using the SLEEP module of visbrain for quite a while and use it to score my PSG data. It's really nice that it can visualize the power spectrum on the topoplot for different frequency bands. However, I wanted to know how I can calculate PSD for each sleep stage across different frequency bands and be able to export the results in a .csv format for further statistical analyses.
Your help is very much appreciated!
Regards,
Mo
GitMate.io thinks a possibly related issue is https://github.com/EtienneCmb/visbrain/issues/35 ([Sleep] Generalize Sleep
module to facilitate sleep scoring of non-human EEG/LFP data ).
Hello @movivi ,
Thanks for your feedback, appreciate. For now, we didn't provide such tools but indeed it would be a nice add-on. I add it on my todo list but to be honnest, both @raphaelvallat and I are running out of time so I can't give you a date. But I'll keep you updated !
Thank you @EtienneCmb :)
Btw I tried using the Signal module to generate the plots for PSD but it cannot load my .EDF files (the same format used to score the sleep stages on the Sleep module). It has array restrictions on the data format. Hence I even cannot open the GUI for Signal module. Is there an alternative way to actually load the sleep data on to the Signal module?
It could be possible yes but you'll not have your PSD power per stage. I think the best way would be to include it inside Sleep.
@raphaelvallat do you have suggestions for the integration inside Sleep?
Hi @movivi and @EtienneCmb!
I also think that adding a "Spectral analysis" module would be a huge plus for Sleep. We could integrate it as a new tab in the quick display panel and then provides the user with several options to define:
- the desired epoch (could be either the current epoch or all the epochs of a specific sleep stage)
- the frequency bands
- the PSD estimation parameters
And then the user would be able to export the results in .csv and plot the PSD using matplotlib-style graphics.
This would require a lot of work in both the GUI and the code, and as @EtienneCmb said earlier we are both very busy at the time. However, in the long term, this is definitely something we can & should add to Sleep.
No worries! It would be great if @EtienneCmb and @raphaelvallat can include PSD into the sleep module since right now I need to export the hypnogram time codes as events to EEGLAB on MATLAB to analyze my data.