<p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;"> External Email - Use Caution </span></p><p></p><div dir="ltr">Hi Edoardo, <div><br></div><div>With define_target_events, you can use a negative value in tmin to detect targets that were preceded within some time window by a cue. If I'm remembering correctly, the target cue would be reference_id, the initial cue would be the target_id, tmin would be the maximum lag between the two (e.g., -3.0 if your variable delay can be up to 3 seconds), and tmax would be 0. You would want to look at both the original events and new_events ndarrays to be sure that new_events contains only the targets of interest.<br></div><div><br></div><div>Hope this helps,</div><div><br></div><div>Jon</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 2:02 PM Dan McCloy <<a href="mailto:dan@mccloy.info">dan@mccloy.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p><span style="padding:3px 10px;border-radius:5px;color:rgb(255,255,255);font-weight:bold;display:inline-block;background-color:rgb(255,0,0)"> External Email - Use Caution </span></p><p></p><div><div>A similar question came up just a few weeks ago on the mailing list, but it involved baselining epochs. See this thread:<br></div><div><div><br></div></div><div><a href="https://mail.nmr.mgh.harvard.edu/pipermail//mne_analysis/2020-March/006551.html" target="_blank">https://mail.nmr.mgh.harvard.edu/pipermail//mne_analysis/2020-March/006551.html</a><br></div><div><div><br></div></div><div>-- dan<br></div></div><div><div><div>Daniel McCloy<br></div><div><a href="https://dan.mccloy.info" target="_blank">https://dan.mccloy.info</a><br></div><div>Research Scientist<br></div><div>Institute for Learning and Brain Sciences<br></div><div>University of Washington<br></div></div><div><br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Wednesday, March 25, 2020 9:40 AM, Edoardo Pinzuti <<a href="mailto:edoardo.pinzuti@gmail.com" target="_blank">edoardo.pinzuti@gmail.com</a>> wrote:<br></div><div> <br></div><blockquote type="cite"><p><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,255,255)"><b> External Email - Use Caution </b></span></span><br></p><p><br></p><div dir="ltr"><div><br></div><div><br></div><div>I can do it manually: getting the data, cut every trial based on the time lags (all trials same length) and redefine the time axis with epochs.times , Is there a way to put back the data in the epoch object or create another one where an array (events,channels,time_points) can be passed? epochs.data does not work<br></div><div><br></div><div>Thanks <br></div><div><br></div></div><div><br></div><div class="gmail_quote"><div dir="ltr">Il giorno mer 25 mar 2020 alle ore 14:29 Alexandre Gramfort <<a href="mailto:alexandre.gramfort@inria.fr" target="_blank">alexandre.gramfort@inria.fr</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,255,255)"><b> External Email - Use Caution </b></span></span><br></p><p><br></p><div dir="ltr"><div>hi,<br></div><div><br></div><div>this is no straightforward equivalent to ft_redefinetrial in mne-python as this stage.<br></div><div><br></div><div>if you keep the stim channel in the epochs you have the information to do this.<br></div><div><br></div><div>someone with a clearer idea of the use case can maybe share some code.<br></div><div><br></div><div>I never had to do this myself<br></div><div><br></div><div>Alex<br></div><div><br></div></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Wed, Mar 25, 2020 at 11:57 AM Edoardo Pinzuti <<a href="mailto:edoardo.pinzuti@gmail.com" target="_blank">edoardo.pinzuti@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,255,255)"><b> External Email - Use Caution </b></span></span><br></p><p><br></p><div dir="ltr"><div> Dear MNE experts,<br></div><div><br></div><div>My experiment contains two cues in each trial with a variable delay in between, I defined each condition base on cue and target cue with mne.define_target_events. Now my '0' in time is related to the first cue. How I can redefine my epochs based on the target cue (using the time lag between the two) so that the time '0' correspond to the appearance of the target cue on each trial? Is there a function similar to ft_redefinetrial ?<br></div><div><br></div><div><br></div><div>Thanks<br></div><div>Edoardo<br></div></div><div>_______________________________________________<br></div><div> Mne_analysis mailing list<br></div><div> <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br></div><div> <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br></div></blockquote></div><div>_______________________________________________<br></div><div> Mne_analysis mailing list<br></div><div> <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br></div><div> <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br></div></blockquote></div></blockquote><div><br></div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Jon M. Houck, Ph.D.</div><div dir="ltr">Associate Professor<br>The Mind Research Network<div>1101 Yale Blvd. NE<br>Albuquerque, NM 87106<br><br></div></div></div></div></div></div></div></div></div></div></div>