A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Forum for discussion on different user applications
spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 10 Feb 2020, 21:11

Hello,

What are the optimal parameters, after changing the code for the Mu Rhythm feedback software provided, with data sourced from a 10-20 electrode for increasing theta power? The following parameters are being considered within our lab:

1. The two parameters of the AR estimator
2. The time duration per trial for cursor task
3. Total number of trials
4. Number of bins when estimating the power spectrum
5. Coefficients for adaptation
6. Buffer length for adaptation (How many trials are used to calculate the mean and variance)
7. The electrodes used (And weights used)

Finally, how would one change adaptation to turn off after 1 minute of stimulation?

Thank you so much. This really means a lot to our lab. We appreciate all your help in advancing mankind's understanding of the human brain.

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

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by mellinger » 11 Feb 2020, 10:25

Hi,

I suggest that you use the settings provided for the mu rhythm feedback, except for electrode and bin selection in the Classifier parameter.
I guess you expect to observe theta activity in frontal areas, so use one or two frontal electrodes for feedback. In terms of frequency, theta ranges from 3.5 to 8Hz, so the 6Hz bin should be the right one, as it ranges from 4.5 to 7.5Hz.

To avoid disappointment, you should perform an initial session as in the mu rhythm case, and analyze it, using the steps explained at
https://www.bci2000.org/mediawiki/index ... I_Tutorial
There, don't follow the the instructions literally but change the subject instruction to something that should elicit theta activity vs something that does not. Also, use as many frontal electrodes as you have available in your EEG setup.

If everything works out well, you will see a change in rhythmic activity between conditions at one or more frontal electrodes. Pick one or two with the highest r^2 values and enter them into the Classifier parameter with a weight of +1.
If you don't see such a change in the initial session, you may need to change instructions, pick a different subject, or check your EEG setup:
https://www.bci2000.org/mediawiki/index ... ment_Setup

HTH,
Juergen

spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 11 Feb 2020, 13:53

Thank you very much for your reply!

One more question: Is there an official link to how to get a headset connected to the software?

This is to ensure we have followed all steps with configuration appropriately.

Thank you,

Mohammad

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

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by mellinger » 12 Feb 2020, 06:27

Mohammad,

I'm not sure I understand your question. Your EEG hardware has a number of EEG channels connected to electrodes which may be part of a headset or not. Make sure to enter the correct channel names into the ChannelNames parameter as described in the tutorial for which I gave you a link.

-Juergen

spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 12 Feb 2020, 17:28

Hello,

Ok. I'll back track for a bit so we can clear things up.

First, how do we know if we have all of the files we need to start, before adding anything in? Is there any way to check besides redoing the installation?

More specifically, how would I makes sure my executable file for a DSI headset is correct? I looking in SRC, Contrib, Signal Source, and DSI, but there seems to be no executable as the wiki states, I will need the executable to change the source for cursor task: https://www.bci2000.org/mediawiki/index ... atch_files

However, I was able to find the executable from someone I know, so I am cautious if it actually works or not. Is there any way to check? Additionally, how would I change the reference to COM3?

So let's say I was able to get the executable file. How would I change the parameters like you said? Is there a file in a Parameters folder?

If my main objective is to modify Mu Rhythm Feedback to just increase Theta, what do I need to do next? Where should I start? I am willing to supply as much information possible to get this issue resolved. I just want to get the Mu Rhythm tutorial loaded and working.

Thank you so much for being so helpful. It really means a lot!

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

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by mellinger » 13 Feb 2020, 08:56

Mohammad,

these are a lot of questions. Let's try to get it all sorted out.
First, how do we know if we have all of the files we need to start, before adding anything in? Is there any way to check besides redoing the installation?
Where did you get the installer from? Which version is the installer? Also note that there are installers that include contributed modules (which DSI is part of), and installers that include only the so-called core modules. DSI is rather recent, so it may be that you are using an old installer, or one without contributed modules, or both.

If you obtain an DSI source executable from elsewhere, chances are that it won't work properly with your version of BCI2000. You might try this installer, although I am not sure whether it contains the DSI module:
http://www.bci2000.org/downloads/bin/BC ... .setup.exe
If it does not contain the DSI module, try this one:
http://www.bci2000.org/downloads/bin/BC ... .setup.exe
So let's say I was able to get the executable file. How would I change the parameters like you said? Is there a file in a Parameters folder?
You use the parameter GUI in the Operator module to modify parameters, and save them as a parameter file. You will need to enter electrode names by hand, unless the DSI module is able to fill them in when you enter a single "auto" into the ChannelNames parameter.
Additionally, how would I change the reference to COM3?
As described on this page
https://www.bci2000.org/mediawiki/index ... :DSISerial
you may specify a different serial port on the command line when starting up the module from the command line.
If my main objective is to modify Mu Rhythm Feedback to just increase Theta, what do I need to do next? Where should I start? I am willing to supply as much information possible to get this issue resolved. I just want to get the Mu Rhythm tutorial loaded and working.
Once you have the DSI source module, and studied its description at
https://www.bci2000.org/mediawiki/index ... :DSISerial
you should be able to go through the mu rhythm tutorial without problems.

-Juergen

spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 13 Feb 2020, 17:25

Hello,

What would be your advice for a "training session" instead of the motor imagery task to find the best channel/frequency to maximize theta? Do you think N-back would work? Is there any module out there with increasing theta as its purpose? It seems like we would have to come up with this training session all on our own.

If possible, could we skip the training session and just select the parameters on our own as it looks like we would have to come up with all of the code to create a training session program? More importantly, if we design a program just to increase Theta, how could we use the BCI 2000 offline analysis tool to do so?

Thank you so much for being the best help on BCI2000. I really appreciate it.

Thank you

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

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by mellinger » 14 Feb 2020, 08:22

Hi,

are you saying you don't expect a simple mental strategy to be sufficient for modulating theta activity? If you need a complex task for this during the initial session, wouldn't you need it as well during the subsequent feedback sessions?

You cannot do this with BCI2000. What you can do is to use BCI2000 in its mu rhythm configuration, and write an external application that displays the complex task. The external application can get notified about BCI2000's internal state changes over UDP connections, and can thus cooperate with BCI2000: https://www.bci2000.org/mediawiki/index ... on_Watches

As an alternative to writing your own application, there is a BCI2000 component that connects to the "Presentation" software as well.

-Juergen

spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 16 Feb 2020, 16:24

Hello,

Three questions that should wrap things up for this thread:

1. The executable was verified to be valid. So the only thing we should do for cursor task is the following line of code after clicking edit (See the attached file called "QuestiononParameters.JPG"). Further down the code, what should be the line of code that should be used for the parameters? Should it be a line calling Mu Rhythm Feedback?

2. The only other thing that we then should do is add in the Mu Rhythm parameters using the Operator module using the GUI and change the electrode(s) and frequency to 6Hz (As discussed earlier in this thread), correct ? Does the headset need to be turned on when this happens? I ask because I cannot click config on the operator module since it is grey. Will the operator module automatically detect we are using the DSI headset?

This is all assuming we are not doing any sort of initial screening session. The final question is as follows:

3. So let's say we have the cursor task all loaded up. Is there is a way to turn off adaptation after 1 min or so? The documentation talked about setting the adaptation to 1 later in the program. Is this related to what I am asking about turning off adaptation after 1 min of feedback? If so, does it get set to 1 manually or automatically?

Thank you for your help thus far and for your detailed replies. You really do care a lot for BCI2000 and the community really appreciates it.

Thank you,

Mohammad
Attachments
QuestiononParameters.JPG
QuestiononParameters.JPG (62.54 KiB) Viewed 46083 times

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

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by mellinger » 17 Feb 2020, 08:51

1. The executable was verified to be valid. So the only thing we should do for cursor task is the following line of code after clicking edit (See the attached file called "QuestiononParameters.JPG").
Looks OK.
Further down the code, what should be the line of code that should be used for the parameters? Should it be a line calling Mu Rhythm Feedback?
It should be a LOAD PARAMETERFILE statement that loads your own parameter file. You create your own parameter file by clicking CONFIG in the Operator module, then use the "Load parameters..." button to load the mu rhythm parameter file, then use the parameter GUI to modify parameters, then use the "Save parameters..." button to save modified parameters under whatever name. Then load this file from the LOAD PARAMETERFILE statement.
I ask because I cannot click config on the operator module since it is grey.
It should not be grey. How did you "validate" your DSI executable?
Is there is a way to turn off adaptation after 1 min or so?
There is no way to do this from BCI2000 parameters, but you can write a script that starts BCI2000, waits for a minute, stops BCI2000, modfies the adaptation parameter, and starts BCI2000 again. I can help you write that script once you have everything else sorted out.

-Juergen

spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 17 Feb 2020, 23:40

Hello,

We are able to load parameters now into the cursor program. However, when modifying the code to set the Spatial Filter option to CAR, we get an error saying adaptation doesn't have enough input electrodes (And the same error shows after we modify Adaptation for Normalizer).

All we are trying to do is get two electrodes, FZ and CZ to have weight 1 at 6Hz in the classifier and get the spatial filter to be CAR as you suggested.

We only need to get the spatial filter and classifier modified and working properly before adding in the script you suggested with the Adaptation and we should be good.

Thank you so much!

Mohammad

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

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by mellinger » 18 Feb 2020, 08:03

we get an error saying adaptation doesn't have enough input electrodes
There is no such error message in the Normalizer filter. Which version of BCI2000 are you running?

In case the error message is "The number of entries in the Adaptation parameter must match the number of input channels", then you have a problem with the LinearClassifier (parameter "Classifier"). In the "Output Channel" entry, you need to have at least one entry with a "2". Please read the documentation of the LinearClassifier filter here:
https://www.bci2000.org/mediawiki/index ... Classifier

-Juergen

spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 18 Feb 2020, 08:31

Hello,

We got that error you are describing exactly.

So what would we need to enter in the classifier parameter to use control of both Cz and Fz to control theta power at 6 Hz?

And would setting the spatial filter to CAR be good enough and not cause an error?

Thank you,

Mohammad


spine321
Posts: 13
Joined: 10 Feb 2020, 21:05

Re: A Theta Power Band Controlled 1D Cursor Task-Parameter Questions

Post by spine321 » 18 Feb 2020, 13:24

Hello,

What modifications would you suggest for the spatial filter? Should it be set to CAR for now?

Also, what is your advice on using a basket task? Should we even use it?

Finally, would you be able to help us code turning off adaptation after 1 minute of the BCI cursor task?

Thank you,

Mohammad

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests