Back to the main page.
Bug 3270 - support common filter approach with dics coherence with a refdip
Status | CLOSED FIXED |
Reported | 2017-03-14 14:00:00 +0100 |
Modified | 2019-08-10 12:42:03 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P5 normal |
Assigned to: | Jim Herring |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2017-03-14 14:00:26 +0100
as discussed with Jim (CC): it is not possible to get or to reuse the filter from the refdip in dics. That means that the common filter approach cannot be used (without hacks). Jim and I discussed a solution for this, which has been tested and which should be integrated in the release.
Jim Herring - 2017-03-15 08:12:27 +0100
Indeed, we've discussed to add the following lines to beamformer_dics where the case of refdip is handled: around line 520 if isstruct(refdip) && isfield(refdip, 'filter') assert(iscell(refdip.filter) && numel(refdip.filter)==1); filt1 = refdip.filter{1}; elseif isstruct(refdip) && isfield(refdip, 'leadfield') assert(iscell(refdip.leadfield) && numel(refdip.leadfield)==1); lf1 = refdip.leadfield{1}; filt1 = pinv(lf1' * invCf * lf1) * lf1' * invCf; % use PINV/SVD to cover rank deficient leadfield elseif isstruct(refdip) && isfield(refdip, 'pos') assert(isnumeric(refdip.pos) && numel(refdip.pos)==3); lf1 = ft_compute_leadfield(refdip.pos, grad, headmodel, 'reducerank', reducerank, 'normalize', normalize); filt1 = pinv(lf1' * invCf * lf1) * lf1' * invCf; % use PINV/SVD to cover rank deficient leadfield else % compute cortio-cortical coherence with a dipole at the reference position lf1 = ft_compute_leadfield(refdip, grad, headmodel, 'reducerank', reducerank, 'normalize', normalize); % construct the spatial filter for the first (reference) dipole location filt1 = pinv(lf1' * invCf * lf1) * lf1' * invCf; % use PINV/SVD to cover rank deficient leadfield end I'll quickly brush-up on my Git skills and attempt to integrate it into a branch and initiate a pull request
Jim Herring - 2017-03-15 08:46:52 +0100
I've updated the changes and initiated a pull-request
Robert Oostenveld - 2017-03-15 11:48:12 +0100
(In reply to Jim Herring from comment #2) https://github.com/fieldtrip/fieldtrip/pull/374
Jan-Mathijs Schoffelen - 2017-11-10 10:40:19 +0100
It looks as if this can be closed. Jim, please confirm, or reopen if you think that you need to do some additional work on this.
Jan-Mathijs Schoffelen - 2017-11-10 10:40:33 +0100
closing
Robert Oostenveld - 2019-08-10 12:35:49 +0200
This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.