meg-pd function "rawdata"

MARUYAMA Masaki INSERM masaki.maruyama at CEA.FR
Mon Feb 9 16:59:31 CET 2009


Hello Laurence,

 

I used the latest version of Fieldtrip, updated on 2009/02/08. However, I found the same problem again in the timing of trial definition. Defined trials often precede by 100 ms or delay 900 ms with respect to its correct time. 

 

As far as I understand "read_data.m" lines 885-905, the program assumes that the beginning of buffer always starts with an integral multiple of hdr.nSamples. However, it is not always the case, as I previously show the examples of rawdata('goto', ***). 

 

I would like to attach an example provided by Dr. Kimmo to read data at 102.9 s. I think the output of rawdata('goto',***) should be used in the program.

 

%%%%%%Example start%%%%%%%%%%%%%%

 

%Go to the buffer containing the sample you want and get the current time point

t0 = rawdata('goto', 102.9);

%Get the buffer

buffer = rawdata('next');

%Find out the correct sample in the buffer

ind = floor((102.9-t0)*sf+1);

% Get the correct vector from the buffer

B = buffer(:, ind);

 

%%%%%%Example end%%%%%%%%%%%%%%

 

Thank you in advance for your further consideration on this issue.

 

 

With best regards,

Masaki Maruyama

 

 

-----Message d'origine-----
De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Laurence Hunt
Envoyé : Thursday, February 05, 2009 11:02 AM
À : FIELDTRIP at NIC.SURFNET.NL
Objet : Re: [FIELDTRIP] meg-pd function "rawdata"

 

Hi Masaki,

 

The MNE-based functions should be ready to use, to read raw fif data -  

but we've only developed them over the last week or two, so please let  

me know if you come across any bugs, or whether it solves the problem  

you encountered with rawdata. We should have a version that's able to  

read evoked .fif files also in the next week or two.

 

Regards,

Laurence

 

 

On 4 Feb 2009, at 16:50, Robert Oostenveld wrote:

 

> Hi Masaki

> 

> On 4 Feb 2009, at 16:55, Masaki Maruyama wrote:

> 

>> After 102.1 second the output delays by 0.1 second, which seems to  

>> be a

>> causal of the wrong time detection of trials. I cannot find out why  

>> it happened

>> in the MEG recording, but I like to see averaged fields from the  

>> data. Could

>> you please give me advices?

>> 

>> Thank you in advance for your kind advices.

> 

> It seems due to a (rounding-off?) bug in rawdata. The fif access mex  

> files are causing a lot of problems, and that is why we recently  

> decided to switch to a new implementation for reading the fif files  

> in fieldtrip.

> 

> The new implementation for fieldtrip is based on low-level functions  

> from the MNE toolbox by Matti Hamalainen:

>  see http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php

> and try the fieldtrip functions read_header and read_data with an  

> explicit specification of headerformat=neuromag_nme and  

> dataformat=neuromag_mne respectively. That should cause the low- 

> level readers from Matti to be used. Also read_event should be able  

> to give you the correct trial markers.

> 

> Laurence (CC) should be able to tell you more about the current  

> status of this new implementation.

> 

> best regards,

> Robert

> 

> PS note that the MNE toolbox functions are not released together  

> with fieldtrip, due to licensing limitations.

> 

 

===========================================

Laurence Hunt, DPhil Student

Centre for Functional MRI of the Brain (FMRIB),

University of Oxford

lhunt at fmrib.ox.ac.uk

Phone: (+44)1865-(2)22738

===========================================

 

----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20090209/198ab6b0/attachment-0002.html>


More information about the fieldtrip mailing list