<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Mehmet,<div><br></div><div>It looks like you are working on a windows-machine. I have never tried to read in 4D-data on a windows machine, but it looks like a windows matlab thing.</div><div>The error message states that the second input argument to fseek (i.e. nbytes2-32) needs to be of class double, whereas it is represented in the file as e 4 byte integer.</div><div>Could you try if the following works: change the end of line 176 from 'uint32=>double' and report back to me whether this works (just send it to me personally; not to the whole list)? </div><div>I will then test whether this change also works on linux/mac and will commit this change to the release version of FieldTrip.</div><div><br></div><div>I noticed in the past that indeed the 'noise-reduced' files cannot be directly read (mainly due to sparse documentation of the file format). However, fieldtrip contains a function "ft_denoise_pca", which is doing exactly the same as the 4D command-line programs "cfw" and "afw".</div><div><br></div><div>I hope this helps,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br></div><div><br><div><div>On Mar 10, 2011, at 7:35 PM, Mehmet-Akif Coskun wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Jan,<br><br><br> Thanks for the reply. I tried reading from the raw data as suggested in the link and i always getting an error like below.<br><br><br>hdr=ft_read_header('E:\fieldtrip_data\c,rfhp0.1Hz')<br><br><br>?? Error using ==> fseek<br>Offset must be of class double<br><br><br>Error in==> fileio\private\read_4d_hdr_at_183<br> fseek(fid,nbytes2 - 32, 'cof');<br><br><br>Error in ==> ft_read_header_at_246<br> orig = read_4d_hdr(datafile,configfile)<br><br><br><br><br>the data that i try to read is raw data (unprocessed) but still i can't read. Previously i was trying the data that has been processed to remove environmental noise in 4d meg system sofware, and that didnt work too.<br><br><br>Which part i am missing?<br><br><br>Thanks<br>Mehmet<br><br>----- Original Message -----<br>From: jan-mathijs schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>><br>Date: Thursday, March 10, 2011 2:46 am<br>Subject: Re: [FieldTrip] 4d data reading (248 sensor MEG system)<br>To: Email discussion list for the FieldTrip project <<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>><br><br><span><p><table><tbody><tr><td style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Hi Mehmet,</p><br><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Please have a look at <a href="http://fieldtrip.fcdonders.nl/getting_started/bti" target="1">http://fieldtrip.fcdonders.nl/getting_started/bti</a>.<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>I would not recommend the .xyz/.m4d variant, but would directly read from the raw data files. Support for .xyz/.m4d files (these files contain relevant header information) is implemented in fieldtrip just for backward compatibility. These need to be created from the raw data (using the pdf2set command (see the software manual of the MEG-system for reference)), but contain only limited header information (e.g. the balancing coefficients are not extracted). To me this sounds like double work, because FieldTrip can read the header information from the raw files directly.<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Good luck,<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Jan-Mathijs<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>On Mar 10, 2011, at 6:36 AM, Mehmet-Akif Coskun wrote:<font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 12px; background-color: white; "><p style="font-family: arial, helvetica, sans-serif; font-size: 12px; "><font face="'PrimaSans BT,Verdana,sans-serif'"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Hello Dear Fieldtrip users,<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font> I am a newbie in fieldtrip. I am having trouble reading the 4d data in fieldtrip. We are using a 248 sensor 4D MEG system. I have followed the discussion list and tried the suggestions but haven't succeeded reading the data. As far as i understand, i need some files (.xyz and .m4d) to be able to read the data but i don't also know how to obtain these files. Can anyone explain me the steps that i need to follow?<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Thanks in advance,<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Mehmet</font></p></div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font> _______________________________________________<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>fieldtrip mailing list<br><a href="javascript:main.compose('new', 't=fieldtrip@donders.ru.nl')"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>fieldtrip@donders.ru.nl</a><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br><div apple-content-edited="true"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br>Dr. J.M. (Jan-Mathijs) Schoffelen </div><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Donders Institute for Brain, Cognition and Behaviour, <br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Centre for Cognitive Neuroimaging,<br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Radboud University Nijmegen, The Netherlands</span></div><br><a href="javascript:main.compose('new', 't=J.Schoffelen@donders.ru.nl')"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>J.Schoffelen@donders.ru.nl</a></span></div><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font>Telephone: 0031-24-3614793<font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font> <font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px; ">> </font><br></td></tr></tbody></table></p></span>> _______________________________________________<br>> fieldtrip mailing list<br>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a> _______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; 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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>