Back to the main page.

Bug 2457 - why does connectivityanalysis using 'pdc' suggest to use cfg.granger.channelcmb?

Status CLOSED FIXED
Reported 2014-01-28 09:46:00 +0100
Modified 2017-11-20 20:14:54 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 minor
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Jörn M. Horschig - 2014-01-28 09:46:58 +0100

cfg.method = 'pdc'; pdc = ft_connectivityanalysis(cfg, freq); pdc = ft_checkdata(pdc, 'cmbrepresentation', 'full'); selection fourierspctrm along dimension 2 Warning: The field cfg.channelcmb is deprecated, please specify it as cfg.granger.channelcmb instead of cfg. > In ft_checkconfig at 460 In ft_connectivityanalysis at 388 In granger_computation at 112 In pipeline_unnoised_connectivity at 63 computing multivariate non-parametric spectral factorization on 4 channels computing spectral factorization [-----------------------------------------] the call to "ft_connectivityanalysis" took 8 seconds and required the additional allocation of an estimated 0 MB The warning happens when computing the transfer function and looks not very intuitive, given that I do not want to compute Granger per se.


Jörn M. Horschig - 2014-01-28 09:51:50 +0100

oh btw, the 'why' in the title is not why a la 'I do not know why' but a why meaning 'the average user would probably ak why'


Jan-Mathijs Schoffelen - 2014-01-28 09:55:00 +0100

because it's just shitty code, I guess ;-). Uhm, I think that ft_checkconfig tries to make a sub-structure out of the options that are needed for the lower level ft_connectivity_pdc. Could be that it's just a typo in the comment.


Jan-Mathijs Schoffelen - 2014-01-28 10:04:14 +0100

No, not a typo in the comment. Ft_connectivityanalysis is calling ft_checkconfig when the inparam (i.e. the parameter from the data to use as input to the lower level function) is equal to transfer. This is the case both for granger and pdc. Apparently, the writer of the code only thought it necessary to create a sub-structure for 'granger' in that case. The question now is, whether the user is right, or the writer of the code ;-). Don't know whether any sub-cfg-options are used to begin with in ft_connectivity_pdc. I suspect that the cfg.granger.channelcmb is needed for multiple pairwise. Don't know whether multiple pairwise spectral factorization should be supported by PDC, because this is inherently advertised as a 'multivariate' measure, i.e. it allegedly quantifies directed coherence between a and b with the rest of the signals partialed out.


Jan-Mathijs Schoffelen - 2014-03-06 15:47:53 +0100

Assigned to a named person, to keep this on the radar.


Jan-Mathijs Schoffelen - 2017-09-04 12:20:21 +0200

I am not sure whether this is still an issue. I think it's fixed.