<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body style="word-wrap:break-word" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Gianpaolo,
<div><br>
</div>
<div>Wonderful! This is exactly what I'm after! Thank you very much for pointing me in the correct direction!</div>
<div><br>
</div>
<div>Peter <br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div><font size="2">__________________________</font></div>
<div><font size="2">Peter Goodin, </font>
<div>
<div>
<div>BSc (Hons), Ph.D Candidate.</div>
<div><br>
</div>
<div><font size="2">Brain and Psychological Sciences Research Centre (BPsych)</font></div>
<div>Swinburne University, </div>
<div>Hawthorn, Vic, 3122</div>
</div>
<div><br>
</div>
<div><font size="2">Monash Alfred Psychiatry Research Centre (MAPrc)</font></div>
<div><font size="2">Level 1, Old Baker Building</font></div>
<div><font size="2">Commercial Road</font></div>
<div><font size="2">Melbourne, Vic, 3004</font><span style="font-size:small"> </span></div>
</div>
<div style="font-size:13px; font-family:Tahoma"><br>
</div>
<div style="font-size:13px; font-family:Tahoma"><br>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF842494" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of Demarchi, Gianpaolo [gianpaolo.demarchi@unitn.it]<br>
<b>Sent:</b> Thursday, 24 January 2013 9:13 PM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] MNE fiff_read / write_raw_segment<br>
</font><br>
</div>
<div></div>
<div>
<div>Hi Peter,</div>
<div>for a similar purpose (i.e. cleaning the trigger lines) I found very helpful copying from an example file:</div>
<div><br>
</div>
<div>mne_ex_read_write_raw.m</div>
<div><br>
</div>
<div>which is in the mne folder as well. This is a nice example script which instructs you on how to open, write and close properly a fiff file, with all the details and parameters explained.</div>
<div>Basically, I just copied and pasted the relevant lines, and put some intelligence in the </div>
<div><br>
</div>
<div>%</div>
<div>% You can add your own miracle here</div>
<div>% </div>
<div><br>
</div>
<div>part (namely, changing accordingly the data(channel, time) matrix).</div>
<div>It's straightforward, but just post back in case of need ...</div>
<div>Best luck,</div>
<div>GP</div>
<div><br>
</div>
<br>
<div>
<div>Il giorno 24/gen/2013, alle ore 10:11, Peter Goodin <<a href="mailto:pgoodin@swin.edu.au" target="_blank">pgoodin@swin.edu.au</a>> ha scritto:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Hi Alex, <br>
<br>
Sorry, that "add" in the first sentence is a little misleading. Please accept my apologies.
<br>
<br>
I'm trying to alter an existing channel with new values, not add a new channel. If the channel already exists but is having the data rewritten, do any changes need to be made to
<a href="http://fh.info.ch" target="_blank">fh.info.ch</a> or any other aspect of fh?<br>
<br>
Thanks and sorry for the confusion again. <br>
<br>
Peter.<br>
__________________________<br>
Peter Goodin,<br>
BSc (Hons), Ph.D Candidate.<br>
<br>
Brain and Psychological Sciences Research Centre (BPsych)<br>
Swinburne University,<br>
Hawthorn, Vic, 3122<br>
<br>
Monash Alfred Psychiatry Research Centre (MAPrc)<br>
Level 1, Old Baker Building<br>
Commercial Road<br>
Melbourne, Vic, 3004<br>
<br>
<br>
<br>
________________________________________<br>
From: <a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a>] on behalf of Alexandre Gramfort [<a href="mailto:alexandre.gramfort@inria.fr" target="_blank">alexandre.gramfort@inria.fr</a>]<br>
Sent: Thursday, 24 January 2013 5:38 PM<br>
To: FieldTrip discussion list<br>
Subject: Re: [FieldTrip] MNE fiff_read / write_raw_segment<br>
<br>
hi Peter,<br>
<br>
when you add channels to a fif structure you need to update the measurement<br>
information (channels names, types etc.). With your notations you should update<br>
fh.info.chs<br>
<br>
hope this helps<br>
Alex<br>
<br>
On Thu, Jan 24, 2013 at 2:59 AM, Peter Goodin <<a href="mailto:pgoodin@swin.edu.au" target="_blank">pgoodin@swin.edu.au</a>> wrote:<br>
<blockquote type="cite">Hi Fieldtrip list,<br>
<br>
I'm trying to add an altered channel and save it as a new fiff file using<br>
the MNE commands from the external/MNE dir in Fieldtrip, but seem to just<br>
keep getting the data from the old fiff file instead.<br>
<br>
The code I'm currently using is:<br>
<br>
To read:<br>
fh = fiff_setup_read_raw('input.fif');<br>
f = fiff_read_raw_segment(fh);<br>
<br>
After adding in the altered channel data to f, I then use:<br>
<br>
fiff_write_raw_segment(output.fif, fh);<br>
<br>
What I thought would happen is output.fif would use the information in f and<br>
fh to write output.fif, but what seems to be happening is the data in f is<br>
being ignored.<br>
<br>
Does anyone have any ideas on how to insert the altered channel data then<br>
write it back out as a fiff file?<br>
<br>
Thanks,<br>
<br>
Peter.<br>
<br>
<br>
<br>
<br>
__________________________<br>
Peter Goodin,<br>
BSc (Hons), Ph.D Candidate.<br>
<br>
Brain and Psychological Sciences Research Centre (BPsych)<br>
Swinburne University,<br>
Hawthorn, Vic, 3122<br>
<br>
Monash Alfred Psychiatry Research Centre (MAPrc)<br>
Level 1, Old Baker Building<br>
Commercial Road<br>
Melbourne, Vic, 3004<br>
<br>
<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the<br>
e-mail<br>
contains patient information, please contact the Partners Compliance<br>
HelpLine at<br>
http://www.partners.org/complianceline . If the e-mail was sent to you in<br>
error<br>
but does not contain patient information, please contact the sender and<br>
properly<br>
dispose of the e-mail.<br>
<br>
</blockquote>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
fieldtrip@donders.ru.nl<br>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>
</blockquote>
</div>
<br>
<div>
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<pre class="moz-signature" cols="72">--
------------------------------------------------------------------------
Gianpaolo Demarchi, PhD <a class="moz-txt-link-abbreviated" href="mailto:gianpaolo.demarchi@unitn.it" target="_blank">gianpaolo.demarchi@unitn.it</a>
MEG Lab phone: 0039 0461 28 30 76
CIMeC - Mind/Brain Center University of Trento
Via delle Regole, 101 I-38100 Mattarello di Trento (TN), Italy
------------------------------------------------------------------------</pre>
<div><br>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>