bbci / bbci_public

MATLAB toolbox for Brain-Computer Interfacing (BCI)
MIT License
148 stars 104 forks source link

Computation of electrode coordinates 1020 #212

Closed sappelhoff closed 4 years ago

sappelhoff commented 6 years ago

With mntutil_posExt1010 you are providing the 3D standard coordinates for a 10% electrode placement system. I am trying to calculate the 10% positions myself and reading the code in this toolbox, I wonder where the following angles (in 90/4°) are coming from:

https://github.com/bbci/bbci_public/blob/d6bf0e442d58d7a6f04952660712b617377b425e/visualization/private/mntutil_posExt1010.m#L32-L72

Were they computed using a different function? Or are these factors somehow obvious from the rules of the 10% placement system and I just don't understand it?

Furthermore, what coordinate system is this? It seems to be spherical with ea being the azimuthal angle and eb being the polar angle, but I cannot make sense of their conversion to xyz with the abr2xyz function: https://github.com/bbci/bbci_public/blob/48fab93b7b7746b53eb382d82fef975c5f63d0a6/visualization/private/mntutil_posExt1010.m#L85-L94

... because for spherical coordinates, the conversion would rather look like:

x = r * sin(polar) * cos(azimuthal)
y = r * sin(polar) * sin(azimuthal)
z = r * cos(polar)

A brief explanation would be appreciated! I have read the [5% article by oostenveld]() as a reference.

sappelhoff commented 4 years ago

closing this due to inactivity.

just a note for future people who may be interested, I implemented an algorithm here: https://github.com/sappelhoff/eeg_positions