Back to the main page.

Bug 2132 - confusing warning or enhancement needed in ft_channelrepair?

Reported 2013-04-22 20:04:00 +0200
Modified 2015-07-15 13:30:48 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Jim Herring
Depends on:
See also:

Ingrid Nieuwenhuis - 2013-04-22 20:04:52 +0200

When using ft_channelrepair, cfg.method = 'spline' the user always gets the warning "make sure that your sensor coordinates are in spherical coordinates" (line 279). FieldTrip sensor coordinates are never in spherical coordinates to start with right? Mine aren't in any way, and I do get the reassuring message "Checking spherical fit... perfect spherical fit (residual: -0.2%) computing weight matrix... done!" So I guess they are transformed to spherical somewhere? So either this warning is confusing, or I'm really messing up my data here. If the user really does have to give in spherical coordinates, I think FieldTrip should do the transform (cart2pol.m) instead. I assume this warning is just confusing since it seems to work.

Jörn M. Horschig - 2013-04-23 10:06:47 +0200

Hi Ingrid, well, the rationale of the spherical spline interpolation, as the name inclines, is that you interpolate on a sphere. The check that is performed checking whether you can fit a sphere so that the electrode positions are on that sphere. A sphere can also be fit but it might be suboptimal - that is what is checked. the CTF MEG sensors are relatively well placed on a sphere-like helmet, usually 3D sensor positions for electrodes are as well. If you use a 2D layout, they should not. So, 'spherical coordinates' does not indeed not mean 'polar' coordinates, I can see why it is confusing. The warning about 'spherical' coordinates was introduced before the sphere-fit-check was performed, so it can be removed now and the output message of the spherical fit test could be improved (btw, the test itself could also be improved, e.g. by a proper goodness of fit test)

Jörn M. Horschig - 2013-04-23 10:08:05 +0200

wow, I'm having trouble myself understanding what I just wrote, hope you can decipher it somehow :)

Jim Herring - 2013-04-23 11:07:34 +0200

Assigned myself - I'll try to improve the warning and goodness of fit test

Jim Herring - 2013-04-23 11:48:32 +0200

I've removed the warning, the goodness of fit test seems to be fine.