Dear Chao,
On Tue, Jul 26, 2011 at 12:04 AM, Chao Liu <[log in to unmask]> wrote:
> Hi
> I have downloaded the MEG data from the website of spm and follow the manual of spm. I stopped after merging the two data set and received two files
> cdbespm8_SPM_CTF_MEG_example_faces1_3D.mat
> cdbespm8_SPM_CTF_MEG_example_faces1_3D.dat
> Then I want to apply the data to my own method so I need to transfer the data to the form which matlab can read directly. Is it a memory map file? how shall I read it to workspace?
If you do:
D = spm_eeg_load
and select your mat file you can access D as a matrix to get the data,
like D(1, 1, 1)
If you then do:
raw = D.ftraw(0);
or
timelock = D.fttimelock;
You will get your data as Fieldtrip's raw or timelock struct respectively.
Finally, you can also read SPM datasets into FIeldtrip using
ft_preprocessing or the low-level functions ft_read_header,
ft_read_data and ft_read_event. You should specify the mat file as the
dataset name in these cases.
> Secondly, for sensors, the are there variable pnt, ori and tra. How can I get the sensor position and orientation, shall I get them by tra*pnt and tra*ori?
The physical sensors in the CTF system are axial gradiometers which
consist of two coils each. Positions and orientations of these coils
are given in pnt and ori and the way they are combined to get the
channel data is specified by tra. There is also an additional
complication of reference sensors. So the information in the sensors
structure is the physical information and doing tra*pnt or tra*ori
doesn't make any physical sense. If you want to get a 3D layout for
plotting you can do
[Lsens, Llabel] = spm_eeg_layout3D(D.sensors('MEG'), 'MEG');
Best,
Vladimir
|