[FieldTrip] Reading brainvision data: problem with channel's resolution
ricardoojm at gmail.com
Sun Feb 17 19:23:05 CET 2013
I solved this problem already. But as I have seen, the marks for the bad
intervals that were defined in the brainvision analyzer are not
automatically imported. Is it really right? And how could I use these
already defined bad intervals, instead of doing the whole artifact
correction again (is there a function in fieldtrip that does it, or do I
have to write one myself)?
Thank you very much once again,
On 15 February 2013 11:52, Ricardo Moura <ricardoojm at gmail.com> wrote:
> Hi Jan-Mathijs,
> Thank you very much for your reply.
> I found a mistake of mine in the data export. I didn't export it as ".dat"
> binary file. I was exporting it as text file. Now, the same script I sent
> in the first email is working in the sense that the program is properly
> recognizing the samples in the data (the 797740 sampling points, instead of
> only 80). Nevertheless, I still have a problem with the channel's
> I saw that when exporting the binary files as ieee 32-bit floating, the
> resolution of the channels is not recorded in the header. So I changed it
> to the "32-bit signed integer" format, and now I have the resolution (in
> the header, it appears as "Ch1=AF3,NewRef,4.1322874E-08,µV", under "Channel
> Infos"), but then, another error message is returned:
> ??? Error using ==> read_brainvision_eeg at 155
> unsupported sub-fileformat
> I tried to export the data in different ways, but the error persists.
> I am afraid there is something else wrong in the way I am exporting the
> data. Could you tell me how I must export the data, or just show me where I
> can find more detailed specifications about it? I searched through the site
> and mailing list, and haven't find further information about it.
> Thanks again,
> Best wishes,
> On 14 February 2013 16:12, Ricardo Moura <ricardoojm at gmail.com> wrote:
>> Dear all,
>> I am very new to fieldtrip and I am experiencing a problem when reading
>> brainvision data. I searched in the mailinglist archives but I didn't find
>> anything that could help me. In case there is information about it
>> somewhere else, I would appreciate if someone can send me a reference.
>> The problem is the following. I am tring to read continuous data from the
>> brainvision analyzer (already preprocessed), but I always have an error
>> which seems to be due to a problem with the identification of the channels
>> resolution. I exported the data from brainvision in ".dat" vectorized
>> format, and I am loading it first with the ft_preprocessing command.
>> Here is the command I am running to load it:
>> cfg = ;
>> cfg.dataset = 'Raw Data Inspection.dat';
>> eegData = ft_preprocessing(cfg)
>> Then the following warning message is returned, for each of the 56
>> channels I have in the data:
>> Warning: Unknown resolution for channel 55 in Raw Data Inspection.vhdr!
>> > In fileio\private\read_brainvision_vhdr at 50
>> In ft_read_header at 381
>> In ft_preprocessing at 394
>> And at the end, I have the following error:
>> ??? Index exceeds matrix dimensions.
>> Error in ==> read_brainvision_eeg at 150
>> dat(chan,:) = tmp(begsample:endsample);
>> Error in ==> ft_read_data at 400
>> dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample,
>> Error in ==> ft_preprocessing at 573
>> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample',
>> begsample, 'endsample', endsample, 'chanindx', rawindx,
>> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat',
>> Interestingly, when I read the header file with the "hdr =
>> ft_read_header('Raw Data Inspection.vhdr')", it says that I have only 80
>> samples in the data. When checking the header file with the notepad, it
>> says that there are actualy 797740 data points.
>> So, am I realling doing it right?
>> Thank you very much in advance, and best wishes,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip