[FieldTrip] Potential bug in trl

Davide Rivolta drivolta81 at gmail.com
Mon Aug 8 12:17:45 CEST 2011


Dear Michael,

After your initial reply I realised that I made a (silly) mistake in the
trialfun. It was not a bug indeed.

My apologies for this,

Davide

On Mon, Aug 8, 2011 at 11:22 AM, Michael Wibral <michael.wibral at web.de>wrote:

> Hi Davide,
>
> would you mind sharing your solution (that could potentially help others as
> well)?
>
> Thanks,
> Michael
>
>
>
>  ------------------------------
> *Von:* "Davide Rivolta" <drivolta81 at gmail.com>
> *Gesendet:* Aug 5, 2011 11:36:07 AM
> *An:* "Email discussion list for the FieldTrip project" <
> fieldtrip at donders.ru.nl>
> *Betreff:* Re: [FieldTrip] Potential bug in trl
>
>
> Dear Jörn,
>
> Thank you for your reply. I guess I have now figured it out.
>
>
> Thanks,
> Davide
>
> On Fri, Aug 5, 2011 at 9:13 AM, "Jörn M. Horschig" <
> jm.horschig at donders.ru.nl> wrote:
>
>> Dear Davide,
>>
>> I never worked with trials of different length, however this should be
>> straight forward when writing your own trialfun (just as Michael proposed).
>> In most trialfuns, the trl matrix is constructed by concatenating the
>> vectors begsample, endsample and offset. These vectors can have any values
>> you want them to have. As a simple example, you can write a trialfun that
>> just returns trl = [1 2 1; 400 500 100] (for your experiment, you of course
>> want these values to be computed from your trigger values).
>> Is your problem that such a thing does not work? It would be great if you
>> give a concrete use-case, or e.g. attach your trialfun.
>>
>> Best,
>> Jörn
>>
>>
>>
>> On 8/4/2011 4:03 PM, Davide Rivolta wrote:
>>
>> Thanks Michael,
>>
>>  I wrote my own trialfun.
>>
>>  The offset would be negative and would have the same lenght of difference
>> between endsample-begsample. This, for each trial, would have a different
>> value.
>>
>> It can be a bug. In fact, I tried to vhange the trialfun by leaving the
>> same begsample and endsample, but I put a fixed offset (i.e., -100) and it
>> worked. All the trial was in and not, like with the variable offset, until
>> time = 0.
>>
>> Thanks,
>>
>> Davide
>>
>> On Thu, Aug 4, 2011 at 3:55 PM, Michael Wibral <michael.wibral at web.de>wrote:
>>
>>> Hi davide,
>>>
>>> I guess in such a case you would have to write your own trial function.
>>> However, offset values larger than 0 mean, that the stimulus occured before
>>> you start your piece of data - is that really what you wanted ?
>>>
>>> Michael
>>>
>>>
>>>  ------------------------------
>>> *Von:* "Davide Rivolta" <drivolta81 at gmail.com>
>>> *Gesendet:* Aug 4, 2011 2:44:08 PM
>>> *An:* fieldtrip at donders.ru.nl
>>> *Betreff:* [FieldTrip] Potential bug in trl
>>>
>>>
>>> Dear all,
>>>
>>> I have noticed that the trial definition works well when begsample,
>>> ensample and offset have fixed values.
>>>
>>> I have however a specific trialfunction, where each trial has a different
>>> lenght.
>>>
>>> This works well when you specify a fixed offset, however, when even the
>>> offset has to change for each trial, Fieldtrip reports values until 0. It
>>> ignores time after 0.
>>>
>>>
>>> Might it be a bug?
>>>
>>> Thanks,
>>>
>>> Davide
>>>
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>>
>> --
>> Davide Rivolta, PhD
>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>>
>> --
>> Jörn M. Horschig
>> PhD Student
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognitive Neuroimaging
>> Radboud University Nijmegen
>> Neuronal Oscillations Group
>>
>> P.O. Box 9101
>> NL-6500 HB Nijmegen
>> The Netherlands
>>
>> Contact:
>> E-Mail: jm.horschig at donders.ru.nl
>> Tel:    +31-(0)24-36-68493 <https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#131a8b3f365bb3e6_>
>> Web: http://www.ru.nl/donders
>>
>> Visiting address:
>> Trigon, room 2.30
>> Kapittelweg 29
>> NL-6525 EN Nijmegen
>> The Netherlands
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
>
> --
> Davide Rivolta, PhD
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 
Davide Rivolta, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110808/e7680d72/attachment-0002.html>


More information about the fieldtrip mailing list