Dear Muhammad,
On Thu, Aug 19, 2010 at 12:20 AM, MP <[log in to unmask]> wrote:
> Hello SPMers,
> i am doing EEG (NeuroScan SynAmp2) analysis using SPM8 and I have a couple
> of very basic questions:
> 1. In order to do re-referencing to mastoids, can I just add the following
> to my pre-processing script?
> S = [];
> S.D = filename;
> S.refchan = {
> 'M1'
> 'M2'
> };
> D = spm_eeg_reref_eeg(S);
Yes.
> 2. There are some trials with a specific "type and "value", which i would
> like to delete before averaging my data. Is it possible through a script and
> without manually deleting them from each file?
Type and value are properties of events (a.k.a. triggers) and not of
trials. Trials are characterized by condition labels that you assign
when epoching. If the trials you want to remove have condition label
different from others then you shouldn't worry because when you
average they will be averaged separately and won't affect the other
trials. You can then remove their average if you want by marking it as
bad and using Other/'Remove bad trials'. If those trials have the same
condition label as other trials there might still be a way to identify
them based on events stored with each trial. That'll work unless you
merged datasets at some point. If that's what you want to do, let me
know and I'll send you some example code, but wouldn't it be simpler
to avoid creating these trials in the first place? In any case you can
mark trials as bad in script using something like:
D = spm_eeg_load;
D = reject(D, [1 2 3 4], 1);
save(D);
Vladimir
|