Signal source module for Brain Products amplifiers

Forum for discussion on different brain signals
Locked
fmanzouri
Posts: 6
Joined: 17 Dec 2013, 09:42

Signal source module for Brain Products amplifiers

Post by fmanzouri » 09 Jan 2014, 05:04

Hi everybody,
I am planning to use BCI2000 for neurofeedback with Brain Products amplifier(brain amp MR plus). I am new to BCI2000. Could you please tell me which module(.exe file) in the Signal source section of BCI2000 launcher and how can I get it?
My second question is about parameters file. How can I make my own parameters file?
Thanks in advance,
Farrokh

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Signal source module for Brain Products amplifiers

Post by boulay » 09 Jan 2014, 09:15

I don't have a BrainVision Recorder dongle with me, so the following is from memory.

You must be running BrainVision Recorder, it must be configured to run the RDA server, and it must be monitoring data (it's the button that looks like an eye in Recorder). Then, from a command-line, change to the BCI2000\prog directory and run

Code: Select all

RDAgetparams > rda.prm
(I can't remember exactly, but you may have to remove one of the spaces, either before or after the > symbol).
The SignalSource module to use with BrainProducts amplifiers is the RDAClient.exe. Be sure to load the rda.prm before pressing "Set Config".
I notice you're using the MR plus. Do you plan to use this simultaneously with fMRI? If so, you may want to ask BrainProducts for the BCI2000 source module and other .dll files you would need to use their RecView program as the RDA server. This would allow you to use RecView's online artifact removal.

The easiest way to make your own parameter file is to launch BCI2000 using the desired modules, then click on Config, then click on "Configure Save...", then check all the boxes of the parameters you want to save, then OK, then "Save Parameters...".
A parameter file is simple text. After you've made one using the above method, you can make small modifications to the parameter file using a text editor, or go through the above process again.
Also note that you can load multiple parameter files with the BCIShell scripting, or even one after the other using the GUI.

fmanzouri
Posts: 6
Joined: 17 Dec 2013, 09:42

Re: Signal source module for Brain Products amplifiers

Post by fmanzouri » 13 Jan 2014, 05:45

Dear Boulay,
Thank you very much for the help. I have just one RDAgetparams file which is a *.cpp file. Is that what you mean or it should be an *.exe file?
Regarding to de SignalSource module I have RDAcleint32.exe and RDAclient.exe, But when I use it as the Signal source module, the Config and set Coinfig buttons are inactive(maybe it is beacause I still do not have the rda.prm file??).
Regarding to Simultaneous recording, you are right. That is my next step, I sent an email to BP as you mentioned and I am waiting for the reply. Have you tried this before with recview?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Signal source module for Brain Products amplifiers

Post by boulay » 13 Jan 2014, 12:48

RDAgetparams.exe should be a binary executable (.exe) found in BCI2000\prog . Maybe you have to download the Contrib package, or maybe you have to compile it yourself. Sorry I don't remember. In any case, all that will do is generate a .prm file for you.

Whether or not you have the parameters, you should still be able to click on "Config" and "Set Config". If I'm remembering correctly, the RDAClient is a little bit different to most other SignalSource modules because it tries to establish a connection with the signal source before "Set Config" is pressed. You have to have BrainVision Recorder up and running, and getting data, before you can launch the BCI2000 modules.

As for the MRI artifact cleaning, yes I tried it with Recview.
Using Recview - pros:
+fastest way to get started
+Comes with many options
Using Recview - cons:
-Recview needs to downsample, so your data are downsampled before they are passed to BCI2000. This means you have to record the raw data with Recorder.
-I found it difficult to find the right parameters for Recview to detect the ECG
-I found it difficult to find the right parameters for Recview to automatically detect template drift. I had to turn off template drift correction then reset manually.
(Edit)
-They don't provide the source code, so I was stuck with an old version of the source module and I couldn't figure out how to get it to work with the new shell scripting, so I had to load my several parameter files manually every time I ran it.

An alternative to using Recview is to write your own artifact-correction algorithm and put it in the BCI2000 filter chain. The easiest way to do this, if you are familiar with Matlab, is to put a Matlabfilter in either you Source module chain or your SignalProcessing chain, and then remove the artifact from within Matlab. If your scan times are deterministic then the MRI gradient artifact removal is quite easy. The ECG artifact removal is a little more difficult because it is difficult to detect the ECG. But, as I said above, I also had trouble getting Recview to detect the ECG. I ran out of development time and ended up using the Recview solution.

Also, let me know if you are using a GE scanner more than ~7 years old. There are some tricks to getting the parameters right when using certain old GE scanners.

fmanzouri
Posts: 6
Joined: 17 Dec 2013, 09:42

Re: Signal source module for Brain Products amplifiers

Post by fmanzouri » 15 Jan 2014, 08:27

It worked! Thanks a lot. you were right. I had to download the contribution files. Now I get the .prm file and also I can receive EEG data in BCI2000 from BVRecorder. I asked from the BP support team about additional files for BVRecview. But I didn't receive any further information.
Now as the first step, I have to face two issues. First, I still get the EEG data only through the BVRecorder(Eventhough BVRecview is running simultaneously).
Second: As I know two monitors are needed. One for experimentor and one for the subject. For Example in P3Speller case, The letters should be displayed on the subjects window and other control windows for the experimentor on the other window. But how can I do this?(I fouond a tutorial in BCI200 documantations, but it didn't help).
Could you help me with any of these issues please?
Regarding to MR Scanner which I use, for now I use Siemens Trio(3T) scanner. But thanks anyways.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Signal source module for Brain Products amplifiers

Post by boulay » 15 Jan 2014, 12:21

fmanzouri wrote:First, I still get the EEG data only through the BVRecorder(Eventhough BVRecview is running simultaneously).
That's correct. BVRecview only serves up the data if you have a special server dll file you'll get directly from BrainVision. BCI2000 can only access the BVRecview server if it is looking at the right port. I don't know what port that is. BrainVision should provide you with a BCI2000 source module that has the BVRecview port hard-coded in.
fmanzouri wrote: Second: As I know two monitors are needed. One for experimentor and one for the subject. For Example in P3Speller case, The letters should be displayed on the subjects window and other control windows for the experimentor on the other window. But how can I do this?(I fouond a tutorial in BCI200 documantations, but it didn't help).
That's up to the Application module and is a different discussion entirely. I believe the cursortask and p3speller modules allow you to specify the coordinates of the feedback window. Try changing those coordinates. It is easiest if, in Windows' monitor manager, you set the secondary monitor to the right of the first monitor then you set your BCI2000 application window x coordinate to be monitor1_width+10.

fmanzouri
Posts: 6
Joined: 17 Dec 2013, 09:42

Re: Signal source module for Brain Products amplifiers

Post by fmanzouri » 17 Jan 2014, 09:39

Great hints!Both worked. I appreciat your help. Now I can control monitors. Regarding to Brainvision Recview, I asked BP support team and they provided me all the necessary documents(Thanks to BP support team). Now I also get the data through the Brainvision recveiw. I also made my own parameter files as you mentioned. Now I am plannig to run P3speller with BVrecorder. But I have a strange problem! When I start the batch after setting the configuration(and getting no error) There is no intensifing on the letters(no flashing). I checked everything with already existing batch for p3speller(with signal generator). All the parameters in the application tab, in speller targets section, are the same and it works correctely with p3speller_signal generator! Do you know what may be the reason?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Signal source module for Brain Products amplifiers

Post by boulay » 17 Jan 2014, 12:23

I assume that after "Set Config" is finished, "Start" becomes available and you press it?

So you are saying you press Start, and there are no errors, but the rows and columns do not flash? And the Application parameters are the same as when you use the signal generator, but with the signal generator the flashes work? That is strange indeed.

There are only two things I can think of off the top of my head that would cause the symptoms you describe. First, you missed one of the parameters and you set the flash colour wrong. Second, one of the modules (likely the source module, since that is all that is different) is causing the entire system to freeze up or go very slowly. Turn on the raw signal visualization (under the visualization tab in parameter configuration). Do you still see signals coming in? Are they progressing at the correct rate?

fmanzouri
Posts: 6
Joined: 17 Dec 2013, 09:42

Re: Signal source module for Brain Products amplifiers

Post by fmanzouri » 20 Jan 2014, 05:02

I get the raw data and it doesn't seem to have any problem like freezing, maybe a delay in range of ms which I can not detect. I have some more information now. This is the green color warning which I get when I press 'Set config':''Warning: P3SpellerTask::Preflight: Due to a sample block duration of 40ms, the actual value of PreSequenceDuration for stimulus 1 will be 480ms rather than 500ms.''
when I change stimulation duration to some value more than 40ms(default value is 31.25ms)then the flashing shows up.
Does this shift in time, make any problem in processing, and if yes how can I fix it?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Signal source module for Brain Products amplifiers

Post by boulay » 20 Jan 2014, 09:13

I think the RDAClient has limited options for the number of samples per block. This will limit your ability to control precisely the flash times.

Set your samples per block to be the minimum allowed then set the various durations for your application to be integer multiples of your block durations. In fact, I think if you don't provide units then the default unit is "blocks".

If you plan to do the MRI artifact removal in the BCI2000 chain (as opposed to using RecView), then you might want to consider configuring your parameters in anticipation of that. For example, you probably will want to use a fast sampling rate to accurately capture the artifact. Also, you may have limited options in setting the scanner and EEG sampling rate to keep the gradient_artifact-sampling_time interval constant.

Locked

Who is online

Users browsing this forum: Google [Bot] and 23 guests