Mensen / swa-matlab

Sleep Wave Analysis - an open source toolbox for matlab to score and analyse various waveforms in sleep EEG data
51 stars 20 forks source link

Question Regarding 9 Channel Display #48

Closed Napneuro closed 7 years ago

Napneuro commented 7 years ago

Hello!

I am new to your toolbox and find it very useful! I was following a previous post on a 4 channel analysis. I have been able to get through all the steps you outlined.

However, I am wondering about possibilities of display. I only have 9 channels (FPz, F3, F4, C3, C4, P3, P4, O1, O2), but I still wish to visually display the average SW across each of the channels. Is this possible given it is not high density? As you mentioned without a full high density data set there are some missing variables. For example also the swa_wave_summary function, I cannot get to work.

Thank you in advance!

Mensen commented 7 years ago

Hi!

Indeed much of the plotting and summary functions are designed for high-density recordings.

However, if you have the channel locations file for the 9 channels included in the dataset, then it should be able to display everything, even if the topographies don't look very detailed.

I would try to do the recommended pipeline of analysis with the 9 channels (rather than the one I suggested for the 4-channel dataset). If you follow the normal template for analysis, then all the variables will be allocated properly, and the functions for visualisation and plotting should work. The problems there will be on the appropriate interpretation of some of the results at that point.

Important side note: are you cross mastoid reference for those channels (ie F3-M2, F4-M1), or using the average of the two mastoids? This will undoubtedly affect the results and interpretability of the subsequent maps.

Just let me know if you run into any errors and I can try to make the scripts more compatible on my side.

Napneuro commented 7 years ago

Hi Mensen,

Thank you for the response!

I followed the standard pipeline and it seems to work, so thank you!

Just one issue comes up- in the future will there ever be an option to load in scoring for the sleep? We tend to score in different software and then export as a text file with epoch, stage, and time. I am just wondering if importing it would be an option. At which point within the scoring GUI one could then just quickly review and mark artifacts to be excluded from the SW analysis.

Generally I assume it can be done if one imports the file and assigns all the variables to the correct expected variables. But at this point it isn't quite clear to me.

Thank you!

Mensen commented 7 years ago

Indeed... basically all you need is a substructure in your EEG file with swa_scoring.stages this should have as many samples in it as your recording does with each sample marked as a stage. Most programs will export just the information for a whole 30 second stage, but you can just take this and then interpolate (nearest neighbour), across all the samples in between (or however you want to create that long vector).

Napneuro commented 7 years ago

Awesome, thanks!