Page 1 of 1

P300 GUI

Posted: 27 Jan 2009, 18:35
by Yueqing Li
Hi,

I met some problems when using P300 GUI. I tried to use P300 GUI to produce r square plots, but got the following error message:

>> P300_GUI
Loading files...
run 1...
Collecting Responses...
??? Index exceeds matrix dimensions.

Error in ==> GetP3Responses at 24
Responses.Responses(kk,:,:)=signal(ind(kk)+windowlen(1)-1:ind(kk)+windowlen(2)-2,:);%-repmat(mean(signal(ind(kk)-1:ind(kk)+windowlen-2,:),1),windowlen,1);

Error in ==> P300_GUI>chvstimebutton_Callback at 676
[Responses]=GetP3Responses(signal,state.trialnr,windowlen,state.StimulusCode,state.StimulusType,state.Flashing,1:SoftwareCh,handles.SF,handles.rndsmp);

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> P300_GUI at 41
gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback


I used P300 Speller copy mode. The data file is from one session before the user finished all the target phrase (I used "Suspend" to stop the spelling process, rather than when the user spelled all of the characters and a "Time Out" message appeared). I got 4 data files by clicking the "Suspend" before the "Time Out" appeared. Three of them would lead to such error message in P300 GUI, and only 1 worked well. Then I recorded another 2 data files the same way, the same error message appeared.

Could anyone help me solve the problem? Thanks a lot.

P300GUI ...

Posted: 27 Jan 2009, 20:20
by gschalk
Yueqing,

I believe this bug, i.e., that the P300GUI does not work with runs that have been suspended before they ended automatically, has been resolved for quite some time. Please update to the most recent version of BCI2000.

Thanks,

Gerv

Posted: 27 Jan 2009, 21:22
by Yueqing Li
Dr. Schalk:

Thank you for your answer. Do you mean that it is because of the BCI2000, rather than P300GUI?

Since this is part of an old experiment, to keep the consistency, I used BCI2000 V1.4 (all the training sessions have been done with BCI200 V1.4), instead of the BCI2000 V2.0. Is there any way solving the problem? Thanks.

P300GUI

Posted: 28 Jan 2009, 11:57
by gschalk
Yueqing,

Sorry for the confusion. What I meant is that P300GUI had a bug that caused this error when you suspend a run manually. This has been fixed a long time ago. Thus, when you download the latest version of BCI2000 and use P300GUI that comes with it, you should be fine.

Gerv

Posted: 28 Jan 2009, 15:21
by Yueqing Li
Dr. Schalk:

I have updated the BCI2000 to Rev. 2234 (I think it is the most recent version) and tried the P300GUI with it. But the same problem still existed.

I wanted to use "Backspace" in the P300 Speller copy mode, but found that users could not use "Backspace" for the last target character. When the set of flashes for the last character finished, there will be a "Time Out" message and the session stopped automatically. Because I can't control the total running time, I used the "Suspend" before the "Time Out".

P300GUI

Posted: 02 Feb 2009, 19:36
by gschalk
Yueqing,

Can you please email me a data file that is causing the problem?

Gerv

Posted: 06 Feb 2009, 16:01
by dthomp
Was this solved? I'm still having a similar problem with an updated source p300_GUI. While I'm at it, I'm not sure that the "contributions" download from the Wiki (http://bci2000.org/downloads/bin/BCI2000Contrib.exe) actually includes any contributions...it doesn't include p300_GUI.

P300GUI ...

Posted: 08 Feb 2009, 20:25
by gschalk
Yueqing/Dave,

I need a data file that is producing the problem and a data file recorded with the exact same options that is not producing the problem. Please email separately to schalk@wadsworth.org, along with a screen shot of the P300GUI and steps to reproduce the problem.

Gerv

Posted: 17 Feb 2009, 14:10
by dthomp
Yueqing, all,

I've come up with one solution for this... add the following code at line 13 of GetP3Responses.m

Code: Select all

numberoftrials = max(trialnr);
if(length(find(trialnr==numberoftrials))<length(find(trialnr==(numberoftrials-1))))
    cutpoint = find(trialnr==numberoftrials,1);
    ind = ind(find(ind < cutpoint));
end
That should be right between the lines where "ind" and "xx" are defined.

I've emailed Gerv, hopefully this or something like it will make its way into the contrib version. In either case, this should get you working for now.

Please note - this is a VERY simple check (just seeing if the last trial has as much data as the second-to-last, and discarding the last trial if it does not). If you do work with varying number of sequences within a run, it might drop your last character on some data sets.

Posted: 19 Feb 2009, 15:33
by dthomp
Perhaps a better option would be to change the "if" statement to

Code: Select all

if(length(signal)<ind(end)+windowlen(2)-2)
I just found an example of a data file where the last trial was shorter and thus the previous code cut it, but in fact there was plenty of data to classify. This will only cut if it would otherwise throw red text everywhere.

P300GUI

Posted: 30 Mar 2009, 20:18
by gschalk
Yueqing/Dave,

The issue with the P300GUI should be fixed in the most recent version on SVN. Just wanted to let you know.

Gerv

Posted: 19 Mar 2010, 01:53
by nadu
Hi !
I am using the MATLAB based P300 GUI. Its generating the r^2 plot without any error. However when I click "Generate Feature weights" it throws the following error. Can you please suggest what I would need to change ?

Code: Select all

[color=darkred]>> P300_GUI
Loading files...
   run 1...
Collecting Responses...

***************************************************************
S001 to S001
***************************************************************

Ch Set: 1  2  3  4  5  6  7  8
Method: SW CAR: 0 DF: 20 RS: 100

Averaging and Decimating...
Stepwise Regression...
...Done

Classifying Responses...

                Target: R 

  Flashes | % Correct | Predicted Symbols
  --------|-----------|------------------
    01    |    100%   | RRRRRRRRRRRRRRR 
??? Index exceeds matrix dimensions.

Error in ==> P3Classify at 133
    pred=predicted(:,kk)';

Error in ==> P300_GUI>runbutton_Callback at 407
                    [predicted,result(:,zz),score,resultthresh]=P3Classify(Responses.Responses(:,:,indm),Responses.Code,Responses.Type,tMUD.MUD,parms.NumberOfSequences,Responses.trial,parms.NumMatrix
                    Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> P300_GUI at 41
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback
[/color]
cheers
nadu

P300GUI

Posted: 19 Mar 2010, 07:26
by gschalk
Hi,

Is this with the most recent version of P300GUI off of SVN?

Gerv

Posted: 19 Mar 2010, 11:35
by nadu
Hi !

Yes, this was downloaded on 3rd March 2010.

cheers
nadu

P300GUI

Posted: 19 Mar 2010, 11:55
by gschalk
Are the data collected with the P3Speller?

If so, did you try the P300Classifier? We no longer support the P300GUI, but will fix any error in the P300Classifier if it does not work with P300Speller data.

Gerv