R2 plots following calibration

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: R2 plots following calibration

Post by mellinger » 06 Jul 2020, 12:19

Hi,

you need to insert the following into P3SpellerTask.cpp, at line 1195:

Code: Select all

  ImageStimulus* pDiodeLight = new ImageStimulus(ioDisplay);
  GUI::Rect diodeLightRect;
  diodeLightRect.left = 0.9;
  diodeLightRect.right = 1;
  diodeLightRect.top = 0;
  diodeLightRect.bottom = 0.1;
  pDiodeLight->SetObjectRect(diodeLightRect);
  pDiodeLight->SetZOrder(-1);
  pDiodeLight->SetFile("./images/transparency.bmp");
  ioStimuli.Add(pDiodeLight);
  for (auto& assoc : ioAssociations)
    assoc.second.Add(pDiodeLight);
What the code does is that it creates an additional stimulus on the display and adds it to all stimulus associations such that it lights up with every row or column.
You can adjust the size of the image using teh left and bottom fields of diodeLightRect.
Finally, could you point me in the correct direction to learn more about the *.mud file type? I found it referenced several time in the source code, but I could not understand what all information goes into the file.
MUD is an obsolete name for the y component of the LinearClassifier parameter. *.mud files were used to transfer classifier weights from the P300Classifier program over to old versions of BCI2000. It's no longer being used and exists only for backward compatibility.

HTH,
Jürgen

lmiller
Posts: 4
Joined: 16 Jun 2020, 11:10

Re: R2 plots following calibration

Post by lmiller » 10 Jul 2020, 14:13

Thank you for your help, I have inserted the code, but now I am having issues building a working version. I have been using these wiki posts to guide my build process: https://www.bci2000.org/mediawiki/index ... ild_System https://www.bci2000.org/mediawiki/index ... or_BCI2000 https://www.bci2000.org/mediawiki/index ... ng_BCI2000 . I am currently using Visual Studio 2019, and when I try to use Cmake on the Cmakelist.txt file in the build directory, it is unable to build. As far as I can tell this is because it is trying to find Qt 4.X, when I have Qt 5.X running on my computer. I tried to use cmake gui to point cmake to ./Qt/mvsc2019_64/lib/cmake/Qt5, but this just causes errors when I try to configure those parameters. I also have tried to edit the Cmake cache to allow the Cmake to use an external distribution of Qt, but it says that it cannot find the correct path for the Qt distribution. I am unsure how to move forward, as if I cannot set the path of the Qt distribution, the configuration fails. If you could, please let me know if there are any wiki articles I am missing that would help me solve this problem.

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: R2 plots following calibration

Post by mellinger » 10 Jul 2020, 15:02

These building instructions are obsolete. Current building instructions are found at:
https://www.bci2000.org/mediawiki/index ... ng_BCI2000
and
https://www.bci2000.org/mediawiki/index ... ng_BCI2000

lmiller
Posts: 4
Joined: 16 Jun 2020, 11:10

Re: R2 plots following calibration

Post by lmiller » 16 Jul 2020, 14:44

Hi Jurgen,

We got the photodiode circle working! Thank you for your help with that. We are now trying to get rid of the photodiode channel (33) when we create the calibration plots using the offline analysis tool, as the data in the photochannel seems to be adding noise to the R2 plot. We created a montage eloc file and loaded it into the BCI offline analysis tool (see images below) but it not removing the photo channel on the R2 plot. Do you know why?

All the best,
Lucas and Kevin
mont comparison.PNG
mont comparison.PNG (144.18 KiB) Viewed 7841 times
aux info.PNG
aux info.PNG (108.03 KiB) Viewed 7841 times

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: R2 plots following calibration

Post by mellinger » 17 Jul 2020, 09:03

Hi,

sorry I was telling you that channels not listed in the eloc file would be suppressed in the r^2 plot. This is only true for the r^2 topography, not for the channel-vs-offset plot.

I don't think the presence of channel 33 has an adverse effect on that plot, unless you are using CAR.

In general, I think there is something wrong with your amplifier. Channels 1-16 seem to have no signal at all (did you check all channels in the signal display after pressing Set Config?). Channels 17-32 show a strange pattern that reminds of a technical artifact rather than an EEG response.

Could it be that one of the headbox cables is not plugged in properly?

-Jürgen

lmiller
Posts: 4
Joined: 16 Jun 2020, 11:10

Re: R2 plots following calibration

Post by lmiller » 17 Jul 2020, 14:42

Sorry, but we forgot to include that this data was just junk data we collected to see how the montage file interacted with a data set that had the photodiode. There was not an actual subject wearing the cap. The main thing that we wanted to show was the labels and how the montage file affected the output. We did not look at the topo plots after adding the montage file, which was our mistake. Next time we make it into the lab, we should be able to record some meaningful data and we will come back with those results.

kpitt
Posts: 10
Joined: 06 Jun 2020, 22:30

Re: R2 plots following calibration

Post by kpitt » 22 Jul 2020, 16:05

Hi Jurgen

Quick question. We are planning to have participants spell a few words each session, meaning we will get a .dat file for each word they spell. I would like to evaluate the EEG data for the session as whole in EEGlab versus having to evaluate each word and then combining the files. Is there a way for us to combine multiple .dat files for upload into EEG lab? Could we simply paste the raw hex data from each .dat file and combine them into one larger .dat file? Or should we use matlab to combine the data files?

All the best,
Kevin and Lucas

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: R2 plots following calibration

Post by mellinger » 23 Jul 2020, 06:56

No, you cannot simply concatenate binary data from each file because the state vector layout might differ between files.
A safe way to do it is to use load_bcidat(file1, file2, file3, ...) and then save_bcidat() in Matlab. To use them, put BCI2000/tools/mex in your Matlab path. For help, type

Code: Select all

help save_bcidat
in Matlab.

HTH,
Juergen

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests