Print

Print


Dear Sheena,

The point is that SPM reads the event channel ONLY WHEN CONVERTING the raw CTF dataset and stores the event times elsewhere (in D.events). So if you overwrite the event channel afterwards SPM will not read it again. As I said the easiest way for you is to use a custom trial definition see p. 108 of the manual.

Best,

Vladimir

On Mon, Aug 3, 2015 at 11:52 PM, Sheena Waters <[log in to unmask]> wrote:
Dear Vladimir:  

Thank you so much for your instant response.  In that case, I have misunderstood how epoching works.  

Here is an example of what I would input for epoching:
J.trialchoice.define.trialdef(1).conditionlabel  = 'B_audmnsStd';
J.trialchoice.define.trialdef(1).eventtype       = 'UPPT001_up';
J.trialchoice.define.trialdef(1).eventvalue      = 5;
J.trialchoice.define.trialdef(1).trlshift             = 0;

By specifying the eventtype as 'UPPT001_up', am I not forcing SPM to find the appropriate event value in the channel (here, 5) and chop accordingly?  I probably just need to go through the SPM code and set some breakpoints.

Thank you again so much for your time.  

Best wishes,
Sheena  

 



On Mon, Aug 3, 2015 at 2:28 PM, Vladimir Litvak <[log in to unmask]> wrote:
Dear Sheena,

SPM does not use the trigger channel for epoching. It's only read during conversion but not after so overwriting it will have no effect. If you want to do custom epoching I suggest you generate a trial definition mat file. The format is described in the manual (search for trl).

Best,

Vladimir

> On 3 Aug 2015, at 23:12, Sheena Waters <[log in to unmask]> wrote:
>
> Dear Vladimir:
>
> I am very sorry to bother you but was wondering if you might be able to assist me with a problem I'm having with SPM epoching / rewriting MEG triggers?
>
> I have written new MEG triggers (i.e. to the UPPT001 channel) to coincide with my ADC channels to get adjusted timings.  Subsequently, I ran SPM epoching using the old trigger values and the new ones but found that, for the latter, SPM did not do any epoching (there was no error message--the epoching was simply not performed for the new trigger values).  When I load the structure in SPM, the new triggers are there (they just are written at only 1 timestamp--and do not extend across a few like the original triggers in UPPT001).
>
> I write new triggers by doing the following:
> D(TiggerChannel, NewIndex) = NewValue,
> where
> D                      =  MEG structure
> TriggerChannel  =   MEG trigger channel (UPPT001)
> NewIndex          =   the index for the correct timestamp to write the new trigger to
> NewValue          =   the value of the new trigger
>
> When I run this, the dat file is updated (but not the mat file) and the new values are there when I reload the data and look at UPPT001.
>
> Any advice would be most appreciated.
>
> Thank you so much for your time.
>
> Best wishes,
> Sheena Waters
>