Errors when using MARIO

Forum for discussion on different user applications
louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Errors when using MARIO

Post by louismayo » 23 Jul 2007, 07:54

Hello,

I am trying to use Mario to analyse off-line analysis but I have the following warning when loading the datas:

Code: Select all

Loading data files...
Warning: Size of gains vector (12579) does not match size of data vector (12579)
;
 possibly using a screening dataset...
> In bci2k_readdat at 102
  In bci2k_Load_Files_fsw at 85
  In data_import at 17
  In Mario_gui>pushbutton9_Callback at 655
  In gui_mainfcn at 75
  In Mario_gui at 42
Warning: Size of offset vector (12579) does not match size of data vector (12579
);
 possibly using a screening dataset...
> In bci2k_readdat at 109
  In bci2k_Load_Files_fsw at 85
  In data_import at 17
  In Mario_gui>pushbutton9_Callback at 655
  In gui_mainfcn at 75
  In Mario_gui at 42
Warning: Size vector should be a row vector with integer elements.
> In repmat at 69
  In bci2k_readdat at 112
  In bci2k_Load_Files_fsw at 85
  In data_import at 17
  In Mario_gui>pushbutton9_Callback at 655
  In gui_mainfcn at 75
  In Mario_gui at 42
and then the following errors if I do try to launch analysis anyway:

Code: Select all

??? Error using ==> mtimes
Inner matrix dimensions must agree.

Error in ==> Do_spatial_filtering at 9

Error in ==> bci2k_P3H at 114

Error in ==> Mario_gui>all_done_Callback at 404

Error in ==> gui_mainfcn at 75

Error in ==> Mario_gui at 42

??? Error using ==> Mario_gui('all_done_Callbac
Error using ==> mtimes
Inner matrix dimensions must agree.

??? Error while evaluating uicontrol Callback
I thought there where some problems from the Mathlab 7.0.4 Runtime Env. libraries so I download the version of the Mario's project website ans since it gave no results, I tried the new version from Mathworks which didn't give satisfaction.
I decided to try the new version of Mario (v2) but when loading the datas:

Code: Select all

Invalid field name: 'Source:TransmissionFilter'.
So I decided to use EEGlab but had problem using the BCI2000toASCIIxxxx tools:

Code: Select all

LIBMX.DLL not found
then

Code: Select all

Entry point for engSetVisible not found in dynamic library LIBENG.dll
and at least with the 6.2 Matlab file format version I got:

Code: Select all

 error openning the file
and finally

Code: Select all

Violation adress in BCItoASCIIxxx at xxx
and

Code: Select all

abnormal program terminason
Does anybody have any idea of what is going on? Are there any problems with my dataset? (Which comes from an homemade acquisition module for BCI2000)

Thank you

Louis

PS: Have nice time in Beijing :wink:

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

Post by mellinger » 23 Jul 2007, 12:34

Louis,

if the Mario error messages make any sense it appears that your acquisition module reports 12579 channels. That would be quite a few ;-)
What does BCI2000FileInfo say when you use it to display your file's data format?

Rather than BCI2000toASCII, try the load_bcidat mex file from tools/mex.
Specifically for import into EEGlab, there is also a Matlab script written by Adam Wilson (src\Tools\EEGlabImport).

Regards,
Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 24 Jul 2007, 05:18

Juergen,

Thank you for your fast answer. I run my acquisition module in debug mode and I don't think it reports 12579 channels but 32 and datas are pumped by packet of 10 samples as required in the prm file. I think the following data file header do confirm it:

Code: Select all

HeaderLen= 12591 SoftwareCh= 32 StatevectorLen= 10
[ State Vector Definition ] 
StimulusCodeRes 8 0 0 0
StimulusTypeRes 3 0 1 0
Running 1 1 1 3
Recording 1 1 1 4
SourceTime 16 0 1 5
StimulusCode 5 0 3 5
StimulusType 3 0 4 2
Flashing 1 0 4 5
SelectedTarget 7 0 4 6
SelectedRow 3 0 5 5
SelectedColumn 3 0 6 0
CurrentMenu 5 0 6 3
PhaseInSequence 2 0 7 0
StimulusTime 16 17528 7 2
As you suggested, I launched the BCI2000FileInfo (whith the file from which you can see see the hearder above) and it answered: "No BCI2000 File " => :( ... I Checked the loops that sweep samples buffer and they always had the right values for NumberOfChannles and NumberOfSamples. Do you have an idea where this 12579 could come from? It could not be divided by 32 or 256 neither by any parameter I do use. It seems to refer to the headerlengh as suggested in the verbatim above, but how to be sure, and how to now if it comes from my acquisition module?

I will have a look to tools/mex and EEGlabimport, but I am not very confident since the file is not even recognised by FileInfo... I'll do a following post thenafter.

Thank you again


Louis

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

Post by mellinger » 24 Jul 2007, 07:48

Louis,

when terming your data acquisition module "home made", does this refer to a BCI2000 source module supplied with your own data acquisition class inheriting from GenericADC? Specifically, is the BCI2000 dat file written by the standard code shared by all existing source modules, or by your own code?

Regards,
Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 24 Jul 2007, 09:31

Juergen,
when terming your data acquisition module "home made", does this refer to a BCI2000 source module supplied with your own data acquisition class inheriting from GenericADC?
Yes. I will supply the acquisition module to Gerv as you suggested some days ago here , but I wanted to perform some tests before any submit.
Specifically, is the BCI2000 dat file written by the standard code shared by all existing source modules, or by your own code?
Yes, the BCI2000 dat file is written by the standard code.

My acquisition module just open handle to device and returns a pointer to the BCI2K formatted buffer address. I followed the implementation documentation and your advice in this forum. I checked that part: it looks to be OK.

Regards,
Louis

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

Post by mellinger » 24 Jul 2007, 09:39

Louis,

if your BCI2000 file was written by the BCI2000 framework, and cannot be read by a current version of BCI2000FileInfo, then this indicates a bug that needs fixing.

Thus, I would be glad to have the file that triggered the problem. Could you send it to my e-mail address?

Thanks,
Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 24 Jul 2007, 09:53

You get the file
HERE

!!! Link will work until next week.

Hope this will help.

Louis

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

Post by mellinger » 24 Jul 2007, 11:09

Louis,

I had a look at the file.
Which SVN revision of BCI2000 are you working with?

Regards,
Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 24 Jul 2007, 11:33

I got the version with Tortoise SVN @ http://www.bci2000.org/svn/trunk but I made not update since maybe a week. Here are the logs after updating:

Code: Select all

Updated \src\Tools\mex\load_bcidat.m
Updated \src\Tools\mex\convert_bciprm.m
Completed At revision: 1451
Regards,
Louis

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

Post by mellinger » 24 Jul 2007, 11:45

Louis,

in the file src/EEGsource/BCIDatFileWriter.cpp, what is in line 116?

Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 24 Jul 2007, 12:03

Here is a part of the code. Hope you'll find what you do need.

Regards,
Louis

Code: Select all

           // Write the header.
110    //
           // Because the header contains its own length in ASCII format, it is a bit
           // tricky to get this right if we don't want to imply a fixed width for the              
           // HeaderLen field.
           ostringstream header;
115   header << " "
116	    << "SoftwareCh= " << ( int )Parameter( "SoftwareCh" ) << " "
                << "StatevectorLen= " << Statevector->Length();
         if( !useOldFormat )
        header << " "
               << "DataFormat= "
               << mInputProperties.Type().Name();
        header << "\r\n"
          << "[ State Vector Definition ] \r\n";
        States->WriteBinary( header );
        header << "[ Parameter Definition ] \r\n";
        Parameters->WriteBinary( header );
        header << "\r\n";

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

Post by mellinger » 24 Jul 2007, 12:21

Louis,

I don't think there is any source code revision that contains "SoftwareCh=" as the first string in line 116.

Next time, please make sure that you undo all your changes to BCI2000 framework files before reporting a problem.

Regards,
Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 24 Jul 2007, 12:58

I am sorry Juergen,

I thought the Tortoise SVN 'Update" would have overwrite this modification and didn't think about it since that time. Actually I tried many times to start from a new subversion folder to prevent that kind of disappointment but I always felt on an compilation error which I couldn't deal with:

Code: Select all

[C++ Erreur] Polynomials.h(255): E2268 Appel à une fonction non définie 'find'
[C++ Erreur] Polynomials.h(255): E2285 Impossible de trouver une correspondance pour '_Vector_iterator<FilterDesign::Complex,allocator<FilterDesign::Complex> >::_Vector_iterator(const _Vector_iterator<FilterDesign::Complex,allocator<FilterDesign::Complex> >&)'
[C++ Erreur] Polynomials.h(263): E2268 Appel à une fonction non définie 'find'
E2285: Non defined function call
E2285: Unable to find correspondence

I though it was a reference to "find" in <algorithm> since I found nothing related in <vector> I finaly kept the first Group of project since it was compiling and seemed to work well. Antway, thank you for your help in finding out that problem, I would have never though by myself that updates in Tortoise SVN hadn't overwrite it.

Thanks,

Louis
Last edited by louismayo on 25 Jul 2007, 05:37, edited 1 time in total.

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

Post by mellinger » 24 Jul 2007, 13:14

Louis,

"Update" will quietly merge your changes into the latest revision, and only notify if there are any conflicts (i.e. changes to the server version that are incompatible with your changes).

Use "Revert" to go back to the version that you checked out initially, and then "Update" to get the latest version.

I think this should also fix your compilation problem.

Regards,
Juergen

louismayo
Posts: 20
Joined: 25 Jun 2007, 05:40

Post by louismayo » 25 Jul 2007, 05:37

Juergen,

That compilation problem appears when I do use a directory with the latest SVN version (on which I didn't make any modification :oops: ). It seems happens only for EEGsource modules when /SignalProcessing/misc/ is included since Polynomials.h calls that 'undefined' function.

I thought it could come from my borland library path so I checked that dinkumware was correctly included. The only way I found to make it compile was to add

Code: Select all

#include <algorithm>
in Polynomials.h hearder because I found a similar definition of 'find' there:

Polynomials.h L256

Code: Select all

std::vector<T>::iterator j = find( denomRoots.begin(), denomRoots.end(), *i )
<algorithm>:

Code: Select all

InIt find(InIt first, InIt last, const Ty& val);
but it may be another :evil: mistake. What do you think?

Thanks again

Louis

Locked

Who is online

Users browsing this forum: No registered users and 2 guests