[FieldTrip] Help with plotting topological map of EEG mini-cap!

Hannah M Ginsberg hginsber at purdue.edu
Mon Oct 26 22:34:25 CET 2020


Hello,

I am working with field trip to create a topological map for our EEG mini-cap we use to collect auditory evoked potentials from chinchillas.

Our data is saved into bdf file format (i.e. via Biosemi). I’ve gone through all the help pages I can find to try to assist me with figuring this out and I am still stuck.

To summarize my problem, I first created a new layout to match the EEG mini-cap using ft_prepare_layout. My resulting layout is attached in the jpeg below.That seemed to work and I saved this layout as a mat file. Next, I tried loading in a bdf file and plotting the response topologically onto the layout that I had just created. For some reason, when I load in the bdf file, it is not able to locate the data (in ft_plot_vector both hdat and vdat are empty zero vectors). The webpage about bdf files mentioned that the data is located in the header but I’m not sure how to specifically access that, as I thought it would automatically be able to locate the data inside the bdf file.


Head figure:
[cid:C2426E86-7C15-41D0-8FA3-5425F19BB6D7 at hsd1.in.comcast.net]

Code I used below:

filename = 'try1.bdf';
cfg.dataset = filename;
cfg.trialdef.eventtype  = 'STATUS';
cfg = ft_definetrial(cfg);

cfg.demean = 'yes';
cfg.baselinewindow = [-0.2 0];
data = ft_preprocessing(cfg);

data2 = ft_selectdata(cfg,data);

[timelock] = ft_timelockanalysis(cfg, data2);

cfg.layout = layout_chincap;
cfg.colorbar='yes';
ft_topoplotER(cfg, timelock)

—> but i get an error:
Index exceeds the number of array elements (0).

Error in ft_plot_vector (line 227)
if vlim(1)==vlim(2)

—> when I put a breakpoint there and debugged to that spot, I could see that vdat is an empty vector and I believe that is where the data should be stored once it is found inside the bdf file
[cid:DEAB5C23-6A03-4613-949A-0C7F0E7CD68C at hsd1.in.comcast.net]

Please let me know if you could help at all with any of this!
My goal is to reproduce a figure similar to this but using the layout I created specific to the EEG mini-cap we use.
[cid:E94C1817-A9A0-4C6A-97B6-E6615270361A at hsd1.in.comcast.net]

You can email me at hginsber at purdue.edu<mailto:hginsber at purdue.edu> if you have any advice and/or knowledge that you think could help me solve this problem.
Thanks!
Hannah

___________________________
Hannah Ginsberg
Graduate Research Assistant
Auditory Neurophysiology & Modeling Lab
Weldon School of Biomedical Engineering
Purdue University: Class of 2020




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201026/dfdb1e07/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: field_trip_headfigure.jpeg
Type: image/jpeg
Size: 15683 bytes
Desc: field_trip_headfigure.jpeg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201026/dfdb1e07/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image3.jpeg
Type: image/jpeg
Size: 21926 bytes
Desc: image3.jpeg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201026/dfdb1e07/attachment-0001.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fig15.png
Type: image/png
Size: 72232 bytes
Desc: fig15.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201026/dfdb1e07/attachment.png>


More information about the fieldtrip mailing list