PDA

View Full Version : EGI Data (Phantom Study)


Ilka
January 24th, 2007, 15:20
Hello!

I can not import the EGIData (.raw)file from the tutorial. And as far as I can see from the source code this file has not the correct stucture for EGI modus. Is that possible?

For Landmark definition I have to select all of them (not only FidNz (Nasion), FidT9 (Left Ear) and FidT10 (Right Ear)), otherwise I get an error message. And if I select all of them the dataset is not correct.

Please help me!

Thank you!

Sylvain
January 26th, 2007, 02:32
Thanks for your report.

Could you please indicate the error message(s) you get in the Matlab command window or elsewhere ?

Thanks!

Ilka
January 29th, 2007, 01:24
Hello!

If I select FidNz (Nasion), FidT9 (Left Ear) and FidT10 (Right Ear) for Landmark definition ->> Did not find sensor named E1 in original sensor location file.

It only works if I select all the sensors. But then the dataset has just 5.9 Kbytes. (In the movie it has 2.9 Mbytes).

An other question:
I have my eeg-data in .edf files. What is the best way to get the .raw and .sfp files out of it?

Thank you!

Thorsteinn
January 29th, 2007, 09:08
Hello!
If I select FidNz (Nasion), FidT9 (Left Ear) and FidT10 (Right Ear) for Landmark definition ->> Did not find sensor named E1 in original sensor location file.
Thank you!

I get exactly the same error trying to import the EGI data in the "Phantom study" tutorial (i.e. when selecting the Landmark definition this error pops-up).

Cheers -
Thorsteinn

Sylvain
January 29th, 2007, 09:50
OK folks,

we're going to check this out.

As for An other question:
I have my eeg-data in .edf files. What is the best way to get the .raw and .sfp files out of it?, please have a look at the website for details on how to write your data in the raw format (ascii or bin):http://neuroimage.usc.edu/brainstorm/mFileHelp/5Toolbox/help_data_raw.html



more soon then !

Sylvain
January 31st, 2007, 10:57
Dear all,

I was wondering to which sample raw data file you were referring to ? Is it the one described in http://neuroimage.usc.edu/brainstorm/TutorialImportRawData.html, which is MEG?

Probably not as you are mentionning EGI data, hence EEG. May I ask to specify where you got the data from ?

Cheers,

Thorsteinn
January 31st, 2007, 13:12
I was using the data refered to in the "Phantom Study" (http://neuroimage.usc.edu/brainstorm/TutorialPhantomStudy.htm) tutorial.

The link to the data is:
http://neuroimage.usc.edu/brainstorm/tutorial/Data/EGIdemo.zip

Ilka
January 31st, 2007, 13:21
Hello!

I used the same data!

Could it be a problem of load_raw.m?

Thanks!

Sylvain
January 31st, 2007, 15:29
Problem's fixed folks. There was a bug in the process of importing EGI data in raw format. Dowload the attached patch to replace the script in the toolbox folder.

Thanks for your precious contribution and let me know if you're running into more troubles.

Cheers,

Thorsteinn
February 1st, 2007, 06:11
Hi, thanks for the update.
Now the files seem to be read properly and imported. But after importing the data an error occurrs every time the matlab file, "EGIdemo_data.mat", is to be read:

Error using ==> load
Can't read file BrainStorm\EGIdemo_data.mat.

I am still just following the tutorial section I mentioned before. (tutorial video! (http://neuroimage.usc.edu/brainstorm/tutorial/Movies/11_PhantomStudy_importEGIData.wmv)).

Cheers,
Thorsteinn

Sylvain
February 1st, 2007, 08:26
This step was working on my station yesterday.
Make sure you have downloaded the latest BrainStorm version (2.2.23)

However, the problem might be related to your local database. Could you please let me know what is the path of your Study folder (i.e. the parent folder where BrainStorm\EGIdemo_data.mat. is stored?). It must not be at the root of a drive, e.g. C:\

Best regards,

Thorsteinn
February 1st, 2007, 09:04
Hi Sylvain and thanks for the reply.

This step was working on my station yesterday.
Make sure you have downloaded the latest BrainStorm version (2.2.23)

I have the latest version (2.2.23 from 31. Jan 2007).


However, the problem might be related to your local database. Could you please let me know what is the path of your Study folder (i.e. the parent folder where BrainStorm\EGIdemo_data.mat. is stored?). It must not be at the root of a drive, e.g. C:\


The path is:
X:\brainstorm\EGIdemo\dataset\BrainStorm

When loading the data the message window reports that it has finished importation, but the error I mentioned is caught and printed in the Matlab command promt (i.e. BrainStorm does not crash in any way). Every time the "refresh" button is then pushed in the "Data Manager" the error is also caught and printed in the the Matlab command promt.

Sylvain
February 1st, 2007, 12:41
OK,

but can you see the data once you have hit 'Close' in the data import window and selected the EGI data in the datamanager (right-click > Load ): you should see the dataviewer window appear on the left handside of the screen, then click on the 'Plot' button at the top of the window.

Cheers,

Ilka
February 2nd, 2007, 02:21
Hello!

I had the same problem. Matlab tries to find EGIdemo_data.mat in the subject folder and not in the dataset folder. I made a copy of EGIdemo_data.m in \brainstorm\EGIdemo\subject\EGIdemo_Subjectraw\Bra inStorm and now it works.

But if I go on with the tutorial and open the MRI viewer the pictures look stange.

Ilka
February 2nd, 2007, 03:06
If I open the MRI Viewer, in the Message window it says: No envelope was selcted for viewing.

What's wrong here?

Thorsteinn
February 2nd, 2007, 03:31
Hi Ilka,

we seem to be struggling with the same tutorial! Have you successfully loaded the EGI data?

I have reinstalled the latest version of BrainStorm and run 'brainstorm_reset.m'. Now the data seems to be loaded but when I try plotting as Sylvain suggested in his last post an error window pops up saying:

- ChannelFlag in data file must be the same length as the Channel structure in channel file

Sylvain
February 2nd, 2007, 09:00
Hold tight folks, we're gonna work this out.

here is what I'm gonna do: redo the tutorial with this data from scratch and see how it goes.

Stay tuned!

Ilka
February 5th, 2007, 02:00
Hello!

Yes, I have successfully loaded the EGI data. Looks good, but I have poblems using RAP-Music.

->Error using ==> load
Unable to read file \BrainStorm\EGIdemo_channel.mat: No such file or directory.

And the MRI pictures still look strange.

Sylvain
February 5th, 2007, 02:07
Hi Ilka,

Do you know what was going wrong on loading the EGI data ?

As for the MRI: press the 'Darken' button several times to adjust the scale of the colormap.

We'll see why the RAP MUSIC does not run properly now.

Cheers,

Sylvain
February 5th, 2007, 10:50
The darken button will do nothing here apparently.
The Phantom MRI got somehow corrupted.

Try to do the following:
At the Matlab command prompt, go inside the subject folder of the EGI subject, then type:

load montreal_subjectimage
Cube = double(Cube);
save montreal_subjectimage Cube -append

and redo the warping and let me know how it looks like

Sylvain
February 5th, 2007, 10:51
By the way, I have heavily redesigned the corresponding webpages in the documentation. The server will be updated overnight.

Ilka
February 5th, 2007, 15:08
Thank you! but...

I don't have the file montreal_subjectimage.mat in the subject folder of the EGI subject(?), but if I make a copy there:

>> load montreal_subjectimage
Cube = double(Cube);
save montreal_subjectimage Cube -append
??? Error using ==> save
Unable to write file montreal_subjectimage.mat: permission denied.

Sorry!

pantazis
February 5th, 2007, 18:34
Hi Ilka,

The montreal subjectimage file does not give good warping results. For some reason, it has been altered from previous versions and I still don't know why.

Try using the subjectimage file:
http://neuroimage.usc.edu/pantazis/montreal_subjectimage.mat
Together with the montreal_4layer_tess.mat file already available in the phantom directory, you should be able to get good warping results.

Also, while revisiting the warping procedure, I fixed minor bugs. Either download the attached m files, or wait one day and redownload brainstorm (the automatic update should include the new m files)

Best,
Dimitrios

Ilka
February 6th, 2007, 02:14
Thank you!

Now it looks much better and RAP-MUSIC works!!!
I did everything in the tudorial again and I had no problem to import the EGI data and the MRI pictures look perfect!

Sylvain
February 6th, 2007, 05:03
This is all good and perfect!

Thanks everybody for your precious contribution and let's get the thing rollin' !

Thorsteinn
February 6th, 2007, 06:16
Hi you all!

I hate to spoil the fun but I am still having some bugs. What Matlab version are you using? I am using Matlab 7.2.0.232 (R2006a).

Regards,
Thorsteinn

Sylvain
February 6th, 2007, 06:56
No pb with spoiling anything ;)

I'm using the same Matlab version as yours. Please send us specific details about he bugs you're experiencing. Maybe this is all because the version you have was not updated?

Thorsteinn
February 7th, 2007, 01:41
I think I have sorted this out.

First there was a minor bug with reading in the data from the ChannelInfo file. There was an empty line at the end of ChannelInfo.sfp, which caused the script reading from the file not to see the end of it. A simple way to fix it was to remove the empty line, but also making some changes in lines 370-398 in 'elpos2bs.m' fixed it (without removing the empty line in ChannelInfo.sfp). I'll attach my changed version of elpos2bs.m.

But the bigger bug involved the reference channel. When reading in the data there was always some inconsistency with the number of channels, it didn't seem to find a reference channel in the data. I changed line 163 in elpos2bs.m from
if(strcmp(label,'cz'))
to
if(strcmpi(label,'cz'))
i.e. made the string comparison ignore case. I guess equivalently it could also be
if(strcmp(lower(label),'cz'))

So now I can finally import the data error free.

Sylvain
February 7th, 2007, 02:20
Hi Thorsteinn,

All teh trouble you describe should be fixed in the latest version (2.2.24). Let me know if you're still having troubles with this one. If yes, I'll include your suggestions.

Thanks a million!

Thorsteinn
February 7th, 2007, 02:51
I downloaded the update file yesterday and also today and still had the errors. The version is 2.2.23 so I guess the update zip file is not up to date?

Sylvain
February 7th, 2007, 04:40
Please try again later today or tomorrow as the automatic update of the archives usually occur at noon on the next day. I'll check also by myself.

Greetings!