Dear Jeroen,
The SPM manual gives quite detailed description and examples of M/EEG
preprocessing, but not specifically with batch. For preprocessing an
easier way to go is to do it once with the GUI and then use 'Save as
script' functionality in the reviewing tool (info/history) tab that
will generate an example script that you can then modify. Then just
for the final part you can add the batch bit to your script.
I don't think there is a reason for you to convert your data to bdf.
The only thing that happens is that the electrode locations from
eeglab are not saved in bdf and then SPM assigns the default locations
which is what you want. You can do the same thing by converting an
EEGLAB dataset directly (it should be in .set file) and then opening
the dataset in 'Prepare' tool and setting the EEG sensor locations to
default (this will then also appear in history so you can script it).
If your data is already epoched you shouldn't use the epoching tool.
If your EEGLAB dataset has multiple trials it will be recognized as
epoched by SPM.
To do the same thing as 'just read' option in a script you can just do:
D = spm_eeg_convert('filename.set');
Best,
Vladimir
On Mon, Nov 7, 2011 at 3:02 PM, Jeroen Van Schependom
<[log in to unmask]> wrote:
> Dear Vladimir,
>
> I am working on a way to import eegdata out of Eeglab into SPM in order to
> be able to do a 3D source reconstruction. For the moment, I export the
> eegdata out of eeglab to .bdf format, convert via spm this format to a spm
> friendly format and perform a 3D source reconstruction. Everything works
> well when these manipulations are done by hand, but several attempts to
> execute these commands by the batch interface failed in several steps :
>
> - The eegdata can already be epoched in eeglab. In the conversion module
> however, I cannot select 'epoched' and 'trials defined in data' as reading
> mode. The only working option is 'continuous'. Although the trials are
> correctly recognized in SPM by view => MEEGdata (trials). By hand (without
> batch) I used the same data, chose the option 'just read' and could define
> the trials without problems in the Epoching section. When running the
> 'epoching' module, with one trial defined I get the error : "index exceeds
> matrix dimension". Should I define each trial separately for each patient ?
> Isn't it possible to use the trial information to do the epoching?
>
> - The reason for working with BDF files was that it allowed us to import the
> channel locations in spm without further input. During 3D source
> reconstruction it suffices to press the 'template', the 'coregistration' and
> the 'Forward' button (EEG BEM) without further input to set up the 3D head
> model and start with the actual inversion. Using the batch interface I seem
> to be obliged to input the coordinates of the fiducials manually. (Maybe
> only one time, which can then be copied - as the rest of the file - once it
> is in .m format). I tried to put the names of the electrodes as 'labels' and
> the 'select from a list' option for three electrodes, but that did not work
> out. Please be aware of the fact that I do not have measures of the
> subject's heads, so I am forced to use the standard coordinates.
>
> Is there a kind of manual especially for the batch interface?
>
> Yours sincerely,
>
> Jeroen.
>
>
|