[FieldTrip] Adding Manual Markers

MUSTAFA YAVUZ m.yavuz.18 at ogr.iu.edu.tr
Wed Nov 25 08:52:55 CET 2020


Hi again Stephen,

Yeah It worked with the cfg.artfct matrix, I can now visualize the area
between my two markers as red-shaded segments in the whole trial.

Thank you!

Stephen Whitmarsh <stephen.whitmarsh at gmail.com>, 25 Kas 2020 Çar, 10:00
tarihinde şunu yazdı:

> Hi Mustafa,
>
> Okay, great! I would first see if ft_databrowser won't just be able to
> treat your data as continuous (note cfg.continuous option in it's cfg), and
> then giving it your start-end markers as a Nx2 matrix in (e.g.)
> cfg.artfctdef.mymarker.artifact when you call it. Pretty sure that'll work,
> and it would remove the need of restructuring your data. You'll only need
> to add cumulative samples to your label samples at each trial, if you get
> my drift.
>
> Hope it works out for you,
> Stephen
>
>
>
>
>
> Op wo 25 nov. 2020 om 02:35 schreef MUSTAFA YAVUZ <
> m.yavuz.18 at ogr.iu.edu.tr>:
>
>> Merhaba Stephen :),
>>
>> Thank you for your informative response! Indeed, I already have data as
>> separate segments (trials) before any initiation with Fieldtrip. I was just
>> wondering if I can plot the event markers just for visualization purposes.
>> However, I've learnt why it is the case now. In my case, I believe a
>> solution would be ; concatenating the trials and manipulating the time axis
>> to arbitrarily create a single trial (continuous?) data  structure and then
>> building a custom trialfun to be able to visualize markers in
>> ft_databrowser.
>>
>> Thank you again,
>> All the best,
>> Mustafa
>>
>> Stephen Whitmarsh <stephen.whitmarsh at gmail.com>, 24 Kas 2020 Sal, 11:04
>> tarihinde şunu yazdı:
>>
>>> Merhaba Mustafa,
>>>
>>> Welcome to FieldTrip!
>>> Just to be clear - I assume you segmented your continuous data into
>>> trials by passing your marker timing as a cfg.trl in ft_preprocessing,
>>> right?
>>> When you did, the temporal information about the markers became
>>> irrelevant, because the trials are then expressed *not *in samples from
>>> the onset of the continuous data anymore, but instead as time relative to
>>> the markers. I.e. each trial now starts at t=0s (-offset), rather and, say
>>> [13, 104, 206, ...] samples (i.e. your initial trl). See the resultant
>>> data.time field.
>>> Secondly, ft_databrowser does not take cfg.trl as the location of
>>> markers, rather it does so in cfg.artfctdef.xxx.artifact (yes, a bit
>>> strange, partly historical, and because databrowser is typically used to
>>> manually scan for artifacts).
>>>
>>> So, in your case, you could either:
>>>
>>> Use ft_databrowser to plot the original, unsegmented, continuous, data,
>>> and pass your trialinfo (as a Nx2 matrix, with only start and end sample)
>>> to cfg.artfctdef.xxx.artifact. Replace xxx with whatever your want, e.g.
>>> "trialnumber"
>>> Use ft_databrowser to plot the segmented data, as trials, with new
>>> time-axis, without the markers.
>>>
>>> Note that ft_databrowser will try to fit your cfg.artfctdef.xxx.artifact
>>> to your segmented trial data as well, by doing some intelligent checking of
>>> your past cfg (which is tracked in your segmented data structure and
>>> beyond), and treating your data as continuous data. That might work, or it
>>> might not, but now you know why!
>>>
>>> Happy fieldtripping,
>>> Stephen
>>>
>>>
>>>
>>> Op di 24 nov. 2020 om 02:29 schreef MUSTAFA YAVUZ <
>>> m.yavuz.18 at ogr.iu.edu.tr>:
>>>
>>>> Hi all,
>>>>
>>>> I've been trying to adjust my EEG data (segmented and .mat file) to be
>>>> analyzed by FT. I already have separate trials and have temporal
>>>> information about the event markers' time courses. I constructed a Nx3 trl
>>>> structure and passed it as cfg.trl while calling ft_preprocessing. Whilst
>>>> the function worked and I can see the cfg.trl field in the output
>>>> structure, when I call ft_databrowser, the event markers are not displayed
>>>> on trials. Do you have any idea/solution for this situation?
>>>>
>>>> Thank you in advance,
>>>> Mustafa
>>>>
>>>> --
>>>> *Mustafa Yavuz *
>>>>
>>>> Ph.D. Candidate in Neuroscience
>>>>
>>>> Department of Neuroscience
>>>> İstanbul University
>>>>
>>>> _______________________________________________
>>>> fieldtrip mailing list
>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>> https://doi.org/10.1371/journal.pcbi.1002202
>>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>> https://doi.org/10.1371/journal.pcbi.1002202
>>>
>>
>>
>> --
>> *Mustafa Yavuz *
>>
>> M.Sc. Candidate in Neuroscience
>>
>> Department of Neuroscience
>> İstanbul University
>>
>> _______________________________________________
>> fieldtrip mailing list
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> https://doi.org/10.1371/journal.pcbi.1002202
>>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>


-- 
*Mustafa Yavuz *

M.Sc. Candidate in Neuroscience

Department of Neuroscience
İstanbul University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201125/30302660/attachment.htm>


More information about the fieldtrip mailing list