Closed jamiecwebber closed 4 years ago
I seems like you get that error when any of the 4 signals (right/left * medial/lateral) has a null set of channels, and the program stops sending its messages after the error. Changing the randi on line 11 of d_PhaseLagIndex_surrogate to randi(size(X, 1)) allowed it to continue sending messages, but some of the dPLI signals were being sent with value NaN. I'm also not sure if it's an equivalent calculation.
I was able to get the desired behaviour by selecting a longer list of electrodes, those used in the eegsonic_dynamic_ranges/joe_stress folder. The electrodes are as follows:
wPLI and dPLI: E 4, 10, 11, 16, 18, 19, 27, 33, 34, 51, 58, 59, 61, 62, 67, 72, 77, 78, 96, 97, 101, 116, 122, 123 PAC: E 4, 10, 11, 16, 18, 19, 61, 62, 67, 72, 77, 78 PE: E 9, 11, 22, 24, 52, 62, 70, 75, 83, 92, 124
There is a problem with the converter, it is using an older version of the data structure.
Following EEG recordings on Wednesday morning November 13, we converted the data to .set using EEGlab and then used "Convert EEG Data" in EEGsonic using the default settings.
When the resulting folders are selected with "Select Replay Directory", none of the items on the right side are checked by default and the sensors have to be selected manually each time you open a new folder (not sure if this is the intended behaviour or I missed selecting a preset somewhere).
Opening a folder with "Select Replay Directory" gives errors in the console:
The help files have a list of electrodes to select for the signals that only use a subset of the EEG. However, with the dPLI when using the default settings from the help file, it looks like it is trying to run the code on an empty array of electrodes, causing an error where there is an invalid value put into a randi function. When no channel are selected, it correctly warns you that "No channels were selected." But selecting only a single channel gives an error: