[Eeglablist] dipfitting for egi: how to align channels

Lucy McGarry lucy.mcgarry at gmail.com
Sat Jul 30 12:21:37 PDT 2011


Hi all,

Thank you for all of your helpful suggestions.  With your help I have
managed to successfully locate dipoles that look sufficiently spread out on
the head for my EGI data.  About 40 dipoles per subject are located within
the head with less than 40% residual variance, from a dataset with 128
channels.

Here are the steps I used to locate channels for my EGI data from a hydrocel
128 cap:

1) Downloaded the sensor position files from: "
  ftp://ftp.egi.com/pub/support/3rdPartySoftwareSupport/BESA/
   You will find the HCGSN sensor position files in the
"HCGSNSensorPositionFiles" folder, and the GSN sensor position files in the
"BESA_sensor_position_files" folder."

2) Uploaded this channel location file using edit - channel locations - read
locations:

EEG=pop_chanedit(EEG, 'load',{'/Users/lucy/Desktop/GSN-HydroCel-129.sfp'
'filetype' 'autodetect'},'changefield',{1 'datachan' 0},'changefield',{2
'datachan' 0},'changefield',{3 'datachan' 0});
        [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

3) Edited channel location names from EGI to 10-20 channel labels:

EEG=pop_chanedit(EEG, 'changefield',{11 'labels' 'Fz'},'changefield',{14
'labels' 'Fp2'},'changefield',{22 'labels' 'Fp1'},'changefield',{25 'labels'
'F3'},'changefield',{34 'labels' 'F7'},'changefield',{37 'labels'
'C3'},'changefield',{46 'labels' 'T7'},'changefield',{53 'labels'
'P3'},'changefield',{59 'labels' 'P7'},'changefield',{62 'labels'
'Pz'},'changefield',{72 'labels' 'O1'},'changefield',{77 'labels'
'O2'},'changefield',{87 'labels' 'P4'},'changefield',{92 'labels'
'P8'},'changefield',{105 'labels' 'C4'},'changefield',{109 'labels'
'T8'},'changefield',{122 'labels' 'F8'},'changefield',{124 'labels' 'F4'});
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

4) Optimized head centre using edit - channel locations - opt. head centre:

EEG=pop_chanedit(EEG, 'eval','chans = pop_chancenter( chans, [],[]);');
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

5) Changed head radius to 85 using edit - channel locations - set head
radius:

EEG=pop_chanedit(EEG, 'headrad',85);
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

6) Fiddled with manual channel co-registration for BESA dipfitting using
tools - locate dipoles using dipfit 2 - head model and settings - manually
co-register:

EEG = pop_dipfit_settings( EEG,
'hdmfile','/Users/lucy/eeglab/plugins/dipfit2.2/standard_BESA/standard_BESA.mat','coordformat','Spherical','mrifile','/Users/lucy/eeglab/plugins/dipfit2.2/standard_BESA/avg152t1.mat','chanfile','/Users/lucy/eeglab/plugins/dipfit2.2/standard_BESA/standard-10-5-cap385.elp','coord_transform',[0
0 0 -0.065043 -0.35228 0.066098 9.2352 11.8371 10.8772] ,'chansel',[1:129]
);
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

7) Ran course dipole fitting.

Thanks again for all of your suggestions.  I hope I've chosen an accurate
series of steps - at least they seem to be working.

Cheers,
Lucy



On Fri, Jul 29, 2011 at 4:05 AM, Tarik S Bel-Bahar
<tarikbelbahar at gmail.com>wrote:

> hi lucy, some ways and throughts below that you might find useful.
> I've been working with egi sensors and have similar issues and questions.
>
> 1. I assume below you have already done searches for similar information in
> the eeglab tutorial (for example, the special appendix on channel locations
> which contains some solutions to questions like ours), and the eeglab list
> archives (which you can download
> zipped and search through for your topic. When dealing with individual
> subject electrode locations, the issues are different and depend of course
> on what kind of analyses your are interested in.
>
> 2.if you don't have polhemus locations per individual subject, then you are
> probably using the hydrocel or earlier model,
> and have probably loaded up these locations from the egi folder with
> locations for their sensor ranges and
> here's the ftp folder and note I got from the egi support team, just in
> case
>   ftp://ftp.egi.com/pub/support/3rdPartySoftwareSupport/BESA/
>    You will find the HCGSN sensor position files in the
> "HCGSNSensorPositionFiles" folder, and the GSN sensor position files in the
> "BESA_sensor_position_files" folder.
> I'll assume that you don't have single-subject electrode locations below.
>
> 3. One could try to "optimize head center" in the channel locations eeglab
> gui. Play around with that, it should spread the trodes
> out. I think you can do so by using all channels, some channels, or a
> specific channel. Try selecting Cz as the channel
> to use for optimization.
>
> 4. Either via #2 or #3 above you should get to a point where you trodes
> look close in shape to the DIPFIT head when you
> are doing the electrode co-registration. At this point, you can manually
> play with the size and rotation via the manual controls.
> Using this method you can get near perfect alignment in under 30 minutes,
> and use the finalized it for the rest of your subject files
> Alternatively, you can also save the locations and then load them up later.
> Check the eeglab tutorial on manual co-registration.
>
> 5. Renaming labels requires a little bit of matlab dexterity. Along the
> lines that Arno suggested, we can
> probably relabel some of our channels as10-20 labels from  egi 's 128
> -channel 10-20 estimates.
> I have not tried it yet, but this should allow almost perfect alignment.
>
> 6. For warping by fiducials, the following has worked for me: clearing any
> existing or automatically detected pairs,
> pairing three landmarks, such as Nz,
> then making sure that no other pairs exist, or are automatically detected -
> if so -relabelling these channels
> so they are not automatically paired, and thus making sure that the pairing
> is only on landmarks of choice.
> Anyway, aligning by a few landmarks (or electrodes near landmarks) is
> probably not as good
> as using 20 or so locations across the head to warp in a way that requires
> very little manual warping or none at all.
>
> 7. please followup on this eeglab thread when and if you you get through
> this impasse and others related
> to channel locations. it would be great to hear of any solutions you come
> up with.
>
> 8. If you're handy with Matlab you can bypass or just hack through some of
> these issues or potential pitfalls.
>
>
>
> Arnaud Delorme arno at ucsd.edu  on
 Jul 28 wrote:

Dear Lucy,

the problem is that your channel labels are not recognized by the
coregistration program (it only recognized 10-20 channel labels). Therefore,
you cannot use the automated method for aligning your montage with the
model. You have to do it manually or use fiducials if you have them.
Best,

Arno


On Fri, Jul 22, 2011 at 4:32 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>wrote:
Dear Lucy,

In case you are saying 'fairly centered in the head' in the 2-D plot, try
'edit - channel locations - opt. head center' (the top button in the right
column). For 3-D head model setting, renaming method should work. Before
seeing dipoles, you should carefully check the fit between your channels and
the model. If you find any problem please let me know.

Makoto




On Thu, Jul 21, 2011 at 5:34 PM, Rentzsch, Johannes <
Johannes.Rentzsch at charite.de> wrote:
I have a related problem: all electrodes are in the center of the head. When
I multiplicate the values in the resize-field by factor 100 then the
electrodes are coreect (version eeglab9_0_4_6s ). In the old version
eeglab7_2_9_20b there isnt this problem.

Hope this will be helpfull - Johannes





On Thu, Jul 21, 2011 at 2:32 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>wrote:
Dear Lucy,

It seems your report is related to the one I recently reported to bugzilla:
https://sccn.ucsd.edu/eeglab/bugzilla/show_bug.cgi?id=1068

If that's the case, then I would recommend:

1. Rename all the channels you want to pair, e.g., if you want to pair B12
with Cz, then rename B12 into Cz from channel edit menu. It is important you
should use only the registered names which are listed in the right column
when pairing (fiducials, too).
2. Run 'warping' with the renamed channels. You don't need to include too
many channels; just choose 5 or 6 (Cz, TP8, TP9, Oz, AFz etc) would be fine.
3. Shift, rotate, and expand the warped channels as necessary by entering
numbers to boxes located at the bottom to fit best to the model (this is
just cut and try). Those that do not fit perfectly are anyway projected to
the surface of the model when running dipfit, so don't worry.

I hope this helps.

Makoto



>
> On Wed, Jul 20, 2011 at 6:55 PM, Lucy McGarry <lucy.mcgarry at gmail.com>wrote:
>
>> Hi all,
>>
>> I am having a problem properly aligning my channels when I try to use the
>> dipfitting procedure for my 128 channel EGI cap.
>>
>> I have automatically located channels for EGI using "warp montage" and the
>> MNI model, but after doing this, all the green channels end up clustered
>> around CZ.  Aligning fucidials does not seem to change anything.  Has anyone
>> else had this problem?
>>
>> I'm not sure what entries to use in the fields at the bottom of the
>> coregistration window, that will optimally make the green electrode icons
>> correctly circle the head.  I tried entering numbers that made the image
>> look as though the electrodes were circling the head, but then when I plot
>> my dipoles, they end up all clustered across the centre of the head.  Does
>> anyone have any suggestions?
>>
>> Thanks very much,
>> Lucy
>>
>> _______________________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110730/348a6819/attachment.html>


More information about the eeglablist mailing list