Problems reading BVA data (segmented)

Hoi Fei Kwok h.f.kwok at BHAM.AC.UK
Fri Dec 16 10:28:30 CET 2005


Hi,

I have read BVA data into FieldTrip. I think you should try not to define
the cfg.trialfun. This will cause the definetrial function to call the
trialfun_general which will obtain the name of the marker file from the
header file and in turn read the events from the marker file in the
read_fcdc_event function. One thing though is that in the read_fcdc_event,
the event.offset is not defined when the filetype is brainvision. This may
cause problem when you try to do further analysis. I have therefore attached
an amended read_fcdc_event.m. Another thing is that the read_fcdc_event
function will get (from the header file) the file name of the marker file
but not the file path. Therefore, to be safe, you should make sure the files
are in the MATLAB search path.

Hope that this will help.

Regards,
Hoi Fei

********************************************

Dr. Hoi Fei Kwok
Research Fellow
SyMon Sensory Motor Neuroscience
School of Psychology
BBS Centre (Hills)
The University of Birmingham
Edgbaston
BIRMINGHAM B15 2TT, UK

Tel: +44-(0)121-4147949
Email: h.f.kwok at bham.ac.uk

*********************************************
 
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Markus Werkle-Bergner
> Sent: 15 December 2005 17:28
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] Problems reading BVA data (segmented)
> 
> Dear all,
> 
> I'm a beginner with fieldtrip, therefore I probably have an easy question.
> 
> I try to read in EEG-data that I already preprocessed in Brainvision
> Analyser. The data is therefore already segmented. From the tutorials
> and the discussion list, I understood that I should nevertheless use the
> function preprocessing.m. Now my guess is that I have trouble with the
> definition of trials from my data-set. I used the following script to
> read the data:
> 
> cfg = []
> % General settings
> cfg.datafile   =
> 'E:\MATLAB\DATA\Oddball_TestFieldtrip\Export\mdo13136_1_HFCrej.dat';
> cfg.headerfile =
> 'E:\MATLAB\DATA\Oddball_TestFieldtrip\Export\mdo13136_1_HFCrej.vhdr';
> cfg.channel = 'all';
> %Trialdefinition
> cfg.trialfun = 'trialfun_brainvision';
> cfg.trialdef.trgfile  =
> 'E:\MATLAB\DATA\Oddball_TestFieldtrip\Export\mdo13136_1_HFCrej.vmkr';
> cfg.trialdef.stim  = 'HFC';
> cfg.trialdef.segment  = 'no';
> cfg.trialdef.timezero = 'no';
> cfg.trialdef.eventtype  = 'Stimulus';
> cfg.trialdef.eventvalue = 'HFC';
> cfg.trialdef.prestim    = 0.500;
> cfg.trialdef.poststim   = 0.600;
> 
> [cfg]Þfinetrial(cfg)
> [raw] = preprocessing(cfg)
> 
> When I run this script, I get the following error-message:
> 
> ??? Error using ==> fieldtrip-20051214\private\read_brainvision_vmrk
> cannot open marker file
> 
> Error in ==> fieldtrip-20051214\private\trialfun_brainvision at 16
> [stim, resp, segment, timezero] =
> read_brainvision_vmrk(cfg.trialdef.trgfile);
> 
> Error in ==> definetrial at 151
>     trl   = feval(cfg.trialfun, cfg);
> 
> Error in ==> FieldtripTest at 17
> [cfg]Þfinetrial(cfg)
> 
> I checked that the *.dat, *.vhdr, and *.vmrk files are all in the
> location specified in the script. I really would appreciate if one can
> give me some advice.
> 
> Best regards,
> Markus
> 
> P.S.: I added the *.vhdr, and *.vmrk files. Perhaps this information is
> needed.
> 
> --
> **************************************************************
> Markus Werkle-Bergner, Dipl. Psych.
> Predoctoral Research Fellow
> 
> Center for Lifespan Psychology
> Max Planck Institute for Human Development
> Lentzeallee 94, Room 211, D-14195 Berlin, Germany.
> Phone: +49(0)30-82406-447       Fax: +49(0)30-8249939
> **************************************************************
> 
> 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: read_fcdc_event.m
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20051216/2b5bed2a/attachment.ksh>


More information about the fieldtrip mailing list