Back to the main page.

Bug 2634 - ft_rejectcomponent: incorrect elec/grad balancing when comp and data in input

Status CLOSED FIXED
Reported 2014-07-04 12:45:00 +0200
Modified 2017-03-14 12:49:15 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3229

Jan-Mathijs Schoffelen - 2014-07-04 12:45:54 +0200

It seems only the invcomp balancing is applied, this should be comp followed by invcomp.


Johanna - 2014-07-04 12:53:37 +0200

Hi JM, To clarify, does this have anything to do with 3rd order gradient balancing (of CTF grad) not being dealt with correctly for ICA? Or do you mean a different balancing? cheers, Johanna


Jan-Mathijs Schoffelen - 2014-07-05 20:11:19 +0200

Hi Johanna, I still have to dig into the code, but it's a different issue. As far as I could see (at an initial glance, but not by looking at the actual code) is that only the 'invcomp' balancing is applied when data is a third input argument to ft_rejectcomponent. Yet, also a 'comp' balancing should be applied first.


Jan-Mathijs Schoffelen - 2014-07-05 20:48:20 +0200

Things are not so bad in the end. It seems the correct balancing is applied to the grad, yet the confusing thing is that it is still only named 'invcomp'. The montage that is applied with data in the input is M = eye(Nchan) - mixing(:,comps)*unmixing(comps,:); When only a comp is present the following montage is applied mixing(:,comps) = 0; M = mixing; Perhaps it makes sense to rename the type of balancing from 'invcomp' to 'comp-invcomp' for the data-present case. Or perhaps even more consistently apply a two step balancing, i.e. a full unmixing and a 'partial' mixing with the to-be-rejected components zeroed out.


Robert Oostenveld - 2017-03-08 15:19:50 +0100

In one of the commits in https://github.com/fieldtrip/fieldtrip/pull/361 I made the explicit distinction between 'invcomp' (when back projecting) and 'reject' (when passing raw data through 'comp' and then 'invcomp', which are actually in one go).