[Eeglablist] Problem with co-register sensor locations
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Tue Oct 13 15:09:07 PDT 2020
Dear Wade,
Sorry but 'ideal projection' does not mean most optimal projection but it
is a 'theoretical projection' from a dipole. I updated my page accordingly.
Sorry for confusion.
For co-registering sensor locations, the above snippet does not do
anything to 'improve' the fitting quality.
Just in case my description mislead you.
If you just want to coregister electrodes with the head model, ignore that
description and just run the normal code.
Makoto
On Sun, Oct 11, 2020 at 9:47 AM Wade Zheng <yzhe163 at aucklanduni.ac.nz>
wrote:
> Hi EEGlab community,
>
> I came across a problem when doing co-register sensor locations. My
> original codes are as follows:
>
> % Co-register sensor locations
> [~,transform] = coregister(EEG.chanlocs,
>
> 'H:\echome\Software\eeglab2020_0\plugins\dipfit3.4\standard_BEM\elec\standard_1020.elc',
> 'warp', 'auto', 'manual', 'off');
> templateChannelFilePath =
>
> 'H:\echome\Software\eeglab2020_0\plugins\dipfit3.4\standard_BEM\elec\standard_1005.elc';
> hdmFilePath =
>
> 'H:\echome\Software\eeglab2020_0\plugins\dipfit3.4\standard_BEM\standard_vol.mat';
> EEG = pop_dipfit_settings( EEG, 'hdmfile', hdmFilePath, 'coordformat',
> 'MNI',...
> 'mrifile',
>
> 'H:\echome\Software\eeglab2020_0\plugins\dipfit3.4\standard_BEM\standard_mri.mat',...
> 'chanfile', templateChannelFilePath,
> 'coord_transform',transform,...
> 'chansel', 1:EEG.nbchan);
> EEG = pop_multifit(EEG, 1:EEG.nbchan,'threshold', 100,
> 'dipplot','off','plotopt',{'normlen' 'on'});
>
> icIdx = 23;
> d1 = EEG.dipfit.model(icIdx).datapot;
> d2 = EEG.dipfit.model(icIdx).idealProj;
> rv = sum((d1-d2).^2) ./ sum(d1.^2);
> EEG.dipfit.model(icIdx).rv; % Should be identical as rv obtained above.
>
> figure
> subplot(1,2,1)
> topoplot(d1, EEG.chanlocs)
> subplot(1,2,2)
> topoplot(d2, EEG.chanlocs)
>
> But it gave me an error :
>
> Reference to non-existent field 'idealProj'.
> Error in PreProWithAMICA (line 88)
> d2 = EEG.dipfit.model(icIdx).idealProj;
>
>
> Then I looked up Makoto's useful EEGLAB codes and added "EEG.dipfit.model(
> cfg.component).idealProj = source.dip.pot;" just before "icldx" and ran it
> again. But this time I still got an error: Unable to resolve the name
> cfg.component.
> Error in PreProWithAMICA (line 85)
> EEG.dipfit.model(cfg.component).idealProj = source.dip.pot; Can anyone
> please tell me where my mistake is? Many thanks! Regards, Wade
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
More information about the eeglablist
mailing list