Dear Vivek,
It's hard to tell from your description whether you've done everything
correctly. I suggest you to use the attached script as a reference. I
also added head model specification to it. Note that there is also a
tool in MEEGTools toolbox (spm_dcm_estimate_group) that makes it
possible to run a set of DCMs defined using GUI on a set of subjects
with pre-specified head models.
If you also want to specify your DCM in script there is an example for
that in \man\example_scripts\DCM_ERP_subject1.m
Best,
Vladimir
On Tue, Oct 11, 2011 at 10:02 PM, Vivek Buch <[log in to unmask]> wrote:
> Hi all,
> I just wanted to clarify what exactly needs to be set up in the .mat file "D" structure before being utilized in the DCM set up.
>
> I used fieldtrip to read the MEG CTF raw data file. I then converted into spm, giving me the primary "D" structure in matlab format that spm uses for most scripts. I have added MEG and MRI fiducials coregistered to one another in head coordinate space using the transformation matrix created by spm_eeg_inv_datareg.m followed by ft_transform_headshape. These are stored in D.inv.datareg.fid_meg (MEG fiducials in head coordinate space; this is also in D.fiducials) and D.inv.datareg.fid_mri (MRI fiducials in head coordinate space). The D.sensors which was created by the fieldtrip/spm conversion of raw data gives the location of MEG sensors, which I think is in head coordinate space.
> The MEG data is stored in D.data.
>
> Once I filter, downsample, and remove artifact, will the file be ready for use by the model? Or is there something else I must do first?
>
> Particularly, am I supposed to do anything to the actual D.sensors variable as a result of the MRI/MEG coregistration?
>
> Thank you for the help.
> Best,
> Vivek
>
|