Print

Print


Hi Muhammad,

I'm afraid I still don't completely understand the problem. When you
epoch the data you are presented with a list of triggers including
type and value and you need to select some of those triggers to define
epochs around. So if you just don't select the trigger you don't want,
wouldn't it solve the problem?

Vladimir

On Thu, Aug 19, 2010 at 4:25 PM, MP <[log in to unmask]> wrote:
> Hello Vladimir,
> Thanks for your response. i was indeed meant "events" when I said trials
> (sorry for the confusion). Actually our system sometimes produces triggers
> that we are not interested in, but have the same number as the trigger of
> interest. Luckily, SPM detects them with a different "type" and "value". So,
> I wanted to include some code in the script that marks these events as bad
> before they are averaged in with the triggers of interest.
> i will really if you could direct me to the right way of doing it.
> Thanks
> - Muhammad
>
>
> On Thu, Aug 19, 2010 at 6:15 AM, Vladimir Litvak <[log in to unmask]>
> wrote:
>>
>> 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
>
>