meg-pd function "rawdata"

MARUYAMA Masaki INSERM masaki.maruyama at CEA.FR
Mon Feb 9 18:37:06 CET 2009


Hello Vladimir,

Thank you for your prompt response.
You are right. I didn't specify the cfg parameters and the path to MNE toolbox. Now I obtained a different result. Trials are still often defined 100 ms earlier than its correct timing, but no trial are defined with the delay of 900 ms. So the problem is not completely fixed yet.
When you need more information, please tell me without any hesitation.

With best regards,
Masaki Maruyama  

-----Message d'origine-----
De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part de Vladimir Litvak
Envoyé : Monday, February 09, 2009 5:41 PM
À : FIELDTRIP at NIC.SURFNET.NL
Objet : Re: [FIELDTRIP] meg-pd function "rawdata"

Dear Masaki,

It sounds like you haven't actually used a different reader, the one
that Laurence had developed. As Robert suggested you should specify

cfg.headerformat = 'neuromag_mne';
cfg.dataformat    = 'neuromag_mne';

in your preprocessing. Then you will get an error message which tells
you to download the MNE Matlab toolbox and when you have this toolbox
in your path then you'll be able to use the new reader.  You'll see
the difference right away as the MNE toolbox prints out a lot of
messages, quite different from meg_pd.

If you still have the problem after all that, please let us know.

Best,

Vladimir

On Mon, Feb 9, 2009 at 3:59 PM, MARUYAMA Masaki INSERM
<masaki.maruyama at cea.fr> wrote:
> 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.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> 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.

----------------------------------
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.



More information about the fieldtrip mailing list