[FieldTrip] Beamformer source analyses with Biosemi 64 EEG channels

Xavier Vrijdag x.vrijdag at auckland.ac.nz
Sun Sep 6 03:47:02 CEST 2020


HI Patrick,

I had a similar situation, using a Biosemi 32 electrode system, without MRI scans, wanting to do source analysis. In order to align the electrodes to the standard BEM, I visually aligned the two and saved that electrode alignment for all further analysis.

Regards,

Xavier

From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Patrick Wiegel <patrick.wiegel at sport.uni-freiburg.de>
Reply to: FieldTrip discussion list <fieldtrip at science.ru.nl>
Date: Saturday, 5 September 2020 at 12:46 AM
To: "fieldtrip at science.ru.nl" <fieldtrip at science.ru.nl>
Subject: [FieldTrip] Beamformer source analyses with Biosemi 64 EEG channels

Dear Fieldtrip community,

I am working with EEG data from a Biosemi 64 channel system from a reinforcement motor learning task. I would like to do Beamformer source analyses on power data. I don’t have individual MRIs or related electrode positions available, so I am taking the standard MRI and BEM headmodel from the fieldtrip templates. I am following the tutorial/examples on the website (http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg_bem/).

I am currently struggling on how to continue with the step electrode alignment. According to the tutorials, I need to align the electrode positions to the MRI in the next step with ft_electrodes_realign. However, it seems that I need to have information on the fiducial which I don’t have. Is there anyone who knows how to do that with biosemi EEG data? I already found this example but cannot relate as there are information on the fiducial and more/other channels available (http://www.fieldtriptoolbox.org/example/biosemi/).

I added my code below. I would appreciate any help. If anyone needs more information on my data or an example set, let me know. I added information on my existing variables below the code.

Best, Patrick


 %% load MRI and BEM templates
load('/Users/patrickwiegel/Documents/MATLAB/Scripts/2020/TF_Data/fieldtrip-20200603/template/headmodel/standard_bem.mat')
load('/Users/patrickwiegel/Documents/MATLAB/Scripts/2020/TF_Data/fieldtrip-20200603/template/headmodel/standard_mri.mat')

%% show Biosemi electrode layout
cfg = [];
cfg.layout = ('/Users/patrickwiegel/Documents/MATLAB/Scripts/2020/TF_Data/fieldtrip-20200603/template/layout/biosemi64.lay');
ft_layoutplot(cfg)

%% import EEG data
EEG_Data = eeglab2fieldtrip( EEG, 'raw', 'none' );

%% define trials for frequency analyses
cfg = [];
cfg.trials = Indexes_correct{1, 1};
cfg.toilim = [0.25 0.55];
data_fed_correct = ft_redefinetrial(cfg, EEG_Data);

cfg = [];
cfg.trials = Indexes_incorrect{1, 1};
cfg.toilim = [0.25 0.55];
data_fed_incorrect = ft_redefinetrial(cfg, EEG_Data);

%% run frequenc analyses
cfg = [];
cfg.method    = 'mtmfft';
cfg.output    = 'powandcsd';
cfg.tapsmofrq = 4;
cfg.foilim    = [25 25];
frequ_correct = ft_freqanalysis(cfg, data_fed_correct);

cfg = [];
cfg.method    = 'mtmfft';
cfg.output    = 'powandcsd';
cfg.tapsmofrq = 4;
cfg.foilim    = [25 25];
frequ_incorrect = ft_freqanalysis(cfg, data_fed_incorrect);




%% define head model
mri = ft_volumereslice(cfg, mri);
display(mri)

%% plot mesh
ft_plot_mesh(vol.bnd(1), 'facecolor',[0.2 0.2 0.2], 'facealpha', 0.3, 'edgecolor', [1 1 1], 'edgealpha', 0.05);
hold on;
ft_plot_mesh(vol.bnd(2),'edgecolor','none','facealpha',0.4);
hold on;
ft_plot_mesh(vol.bnd(3),'edgecolor','none','facecolor',[0.4 0.6 0.4]);

%% extract electrode posiitons from Biosemi file and convert to fieldtrip struc
sens.label = EEG_Data.elec.label;
sens.chanpos = EEG_Data.elec.elecpos;
sens.elecpos = EEG_Data.elec.pnt;

elec = ft_datatype_sens(sens);
elec = ft_convert_units(elec, 'mm');
display(elec)

%% plot mesh and electrode positions
figure;
% head surface (scalp)
ft_plot_mesh(vol.bnd(1), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]);
hold on;
% electrodes
ft_plot_sens(elec);

%% align electrodes


variables:
mri =

  struct with fields:

      anatomy: [256×256×256 double]
     coordsys: 'spm'
          dim: [256 256 256]
    transform: [4×4 double]
         unit: 'mm'
       inside: [256×256×256 logical]
          cfg: [1×1 struct]


elec =

  struct with fields:

     chanpos: [64×3 double]
    chantype: {64×1 cell}
    chanunit: {64×1 cell}
     elecpos: [64×3 double]
       label: {1×64 cell}
        type: 'eeg1010'
        unit: ‚mm'

vol =

  struct with fields:

     bnd: [1×3 struct]
    cond: [0.3300 0.0041 0.3300]
     mat: [3000×3000 double]
    type: 'dipoli'
    unit: 'mm'


Patrick Wiegel
Department of Sport and Sport Science

University of Freiburg
Sandfangweg 4
79117 Freiburg i. Br .
phone: +49 (0)761/ 203-4550
email: patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>
web: www.sport.uni-freiburg.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200906/823eb71d/attachment.htm>


More information about the fieldtrip mailing list