<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Jan,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks very much for your response. I have gone through the website (and trial fun examples I could look at in the trialfun directory) and cant find a guide on how to define a custom trial structure using pre-existing user defined labels for the start and end
 segments of interest marked in an external edf processor. Most of the examples of fieldtrip example trialfun involve trigger, stimulus, response. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Is there another link to a simple code somewhere I can be directed to?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Mubeen J</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen@donders.ru.nl><br>
<b>Sent:</b> Wednesday, February 10, 2021 10:49 AM<br>
<b>To:</b> FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Subject:</b> Re: [FieldTrip] Defining trials</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi Mubeen,
<div class=""><br class="">
</div>
<div class="">You’d need to write your own ’trialfun’ if you want to achieve what you want. See: <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fexample%2Fmaking_your_own_trialfun_for_conditional_trial_definition%2F&data=04%7C01%7C%7C35b349fdf5d54862ead408d8cd9b9f4a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637485415762819934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=al%2BM6Yh6GeX6ig3VjZf2cmnOUbBNbpfrPAP%2F5S54zZc%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition/" shash="cr3WjXb6IdPSg76uG7uYfDBO9PZbXwDj936bGXHedwF4coC4Tyo2+6xQP41V+7t44PmC59crZ758ScNiA9k+g3JWj7jERcp759dhBxsT5xkuu2MTHkJcbKYJWj0+qKXU3KIhNQ9DJn+jOVVG6MDsqz+zVAU3n7fluLPECETNC8s=" class="">https://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition/</a></div>
<div class="">to get started.</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 10 Feb 2021, at 00:52, mubeen afzal <<a href="mailto:mubafzal@hotmail.com" class="">mubafzal@hotmail.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Hi all,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Following up on this. Could someone help me with this code please. </div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
cfg = ft_define trial</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I have event labels on my file 'ep.sw' and 'end' defining segments of interest</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<span id="x_cid:0256e54f-5562-46b2-ac12-343f198d7446"><image.png></span><br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
How can I create trials<span class="x_Apple-converted-space"> </span><u class="">around only segments between 'Ep.sw' and 'end'.</u> I dont know where to define the end segment for each trial. In the edf file label its named 'end'. </div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Regards,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Mubeen</div>
<div class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div id="x_appendonsend" class=""></div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:1071.125px">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_Apple-converted-space"> </span>mubeen afzal<br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Sunday, February 7, 2021 1:17 AM<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span><a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a> <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>Defining trials<span class="x_Apple-converted-space"> </span></font>
<div class=""> </div>
</div>
<div dir="ltr" class="">
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Hi all,</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Can I get help with a code to allow my edf files each with a number of segments labelled 'ep.sw' at the start and 'end' at end of segment of interest (ranging between 2-10 seconds). </div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</span></div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">The stim and response based entries in code is abit confusing for me as a beginner and I would just
 like to define trials based on start and end markers I have mannually marked on segments of a continuous EEG.</span><br class="">
</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">All help will be much appreciated.</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Regards,</div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Mubeen  </div>
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">fieldtrip
 mailing list</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=04%7C01%7C%7C35b349fdf5d54862ead408d8cd9b9f4a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637485415762819934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HJnZBYTsGr7exYAF16leJ1eLLeleF%2F9v6NDVNxwQ8Nk%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="H7yz94KjDFlT3CwEvahRcJy/K+eTCb0C7tKGr9RJHpXS7LebgArR0A6ZtpyasZyTJEDVEIAc2sREHKlmVTz273lSEa5rj5WZwJv8CNmyS0z0v45ij7k4drj9Uc+wWerrubI3kMvWqs3gusHNOrn1sFqqv90bJTXGNPbWYKdtSpU=" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=04%7C01%7C%7C35b349fdf5d54862ead408d8cd9b9f4a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637485415762829928%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XlP%2BiNdLjNjJ%2FyiPZsZ92DTabNRSRnJ0DdVJwPWsygw%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="XQD+Z/9B1V+4CUQ/rLu6PvrkC8I2gB8AM/7c1AOJ4X5v13T9QnSnH+VXde5vu1nezq4XCTTmFEPwolc7bIkja5N74Ozv27+ssRgME6sdZwj7Hlc5fPAvTs0IgjOrxqrVp+Vr53QerzRDtulu3p+q2PUKiXJiMw4/wnj36FCUWJE=" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></span></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>