Back to the main page.
Bug 2777 - freq2timelock / timelock2freq
Status | ASSIGNED |
Reported | 2014-12-11 20:15:00 +0100 |
Modified | 2015-01-14 15:27:30 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | Macintosh |
Operating System: | Mac OS |
Importance: | P5 major |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Raghavan Gopalakrishnan - 2014-12-11 20:15:41 +0100
It appears that the functions freq2timelock and timelock2freq needs some update First, freq2timelock 1. The function puts a restriction cdim to be 2 and fdim to be 3, however such a dim is possible only when the data has the following dimord 'rpt_ch_freq_time'. But the function is supposed to take data with simord 'ch_freq_time' 2. If data with simord 'rpt_ch_freq_time' is given, line 42 dimindex command would not work. More over, transpose on line 42 is not needed. Only then spctrm on line 48 will be ch x time for a specific frequency given by cfg.frequency 3. Line 46 channelselection should be ft_channelselection 4. If noise covariance matrix is given along with the data data.cov is no longer carried on beyond freq2timelock function, since timelock.cov=freq.cov is not a part of the code Second, timelock2freq 1. mom is mostly always a cell matrix, the function does not take cell input. Thanks for your help Raghavan
Robert Oostenveld - 2014-12-12 08:57:54 +0100
Hi Raghavan Thanks for noticing. Those functions have indeed not been revisited for quite some time, and nowadays there will indeed be other use cases that were not considered when implementing them. I will write a test function that goes through the different options and keep you posted through bugzilla. Robert
Tilmann Sander-Thommes - 2015-01-14 14:21:55 +0100
Similar to the initial remark in line 53 the prefix ft_ is missing: cfg.channel = channelselection(cfg.channel, freq.label); Best, Till