[FieldTrip] shifting events

mubeen afzal mubafzal at hotmail.com
Sun Mar 28 07:06:26 CEST 2021


Thanks Jan, managed to get to a page which provided this info.

Regards
Mubeen

________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl>
Sent: Saturday, March 27, 2021 6:43 PM
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] shifting events

Hi Mubeen,
It sounds a bit mysterious that the ’trial configuration is not working to give me a -0.5 sec baseline’, but you can write your own ’trialfun’ (if you look through the documentation on fieldtriptoolbox.org<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffieldtriptoolbox.org%2F&data=04%7C01%7C%7Cb8f74c3f285c4063bb3708d8f13b76e3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637524585197269843%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kyXCFnxlP4yh3EfT0aNo4F6a2nStHWztrWdkPidt6No%3D&reserved=0> you’ll easily find the relevant links), which allow you to create your epochs-of-interest according to your wishes.
For instance, you can include a line that takes the relevant events’ samples, and subtract a fixed value to define the starts of your epochs.

Good luck,
Jan-Mathijs


On 27 Mar 2021, at 13:54, mubeen afzal <mubafzal at hotmail.com<mailto:mubafzal at hotmail.com>> wrote:

Hi all,
I would like to shift the event values after the ft_readevent function before creating trials.

The trial configuration is not working to give me a -0.5 sec baseline.

cfg.trialdef.prestim doesnt allow -0.5 sec.

cfg.trialdef.eventtype  = 'annotation'
cfg.trialdef.eventvalue = 'Ep.sw'
cfg.trialdef.prestim    = 0
cfg.trialdef.poststim   = 5
cfg.trialfun   = 'ft_trialfun_general'

How can I shift my manual annotations to include -0.5 before my event.value annotation. Any help will be appreciated.

Regards,
Mubeen
<fieldtrip .jpg>_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=04%7C01%7C%7Cb8f74c3f285c4063bb3708d8f13b76e3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637524585197269843%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1%2FIGTtOk8bzoU1Kz9LKLeEHDdL9gSEP82k6J6hApEQs%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=04%7C01%7C%7Cb8f74c3f285c4063bb3708d8f13b76e3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637524585197279838%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9YNqBeVctjtCpZZTlu8HPGqjRENwig4xnxwI5zgfP8w%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210328/67d80ef6/attachment.htm>


More information about the fieldtrip mailing list