Back to the main page.
Bug 2222 - unsupported dimord structure in ft_freqcomparison, to be replaced by ft_math
Status | CLOSED FIXED |
Reported | 2013-07-30 11:49:00 +0200 |
Modified | 2013-09-18 13:19:12 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | All |
Operating System: | All |
Importance: | P3 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Izabela Mikula - 2013-07-30 11:49:47 +0200
Ft_freqcomparison uses an output of the ft_freqanalysis as an input. However, to perform the comparison between two freq structures the ft_freqcomparison only expects the data with dimord: rpt_chan_freq, subj_chan_freq or chan_freq (it's not stated in the help, but in the code in the 'if'statement). If the input argument has dimord represented differently (e.g. chan_freq_time) the comparison is not performed. Not only is this data representation not supported, but also instead of giving an error the function gives a first freq structure (one of two that were supposed to be compared) as an output. To reproduce call ft_freqcomparison(cfg,freq1,freq2) with freq1.dimord='chan_freq_time' and freq2='chan_freq_time'.
Robert Oostenveld - 2013-07-30 13:21:00 +0200
thanks for reporting, I just fixed it. mac001> svn commit ft_freqcomparison.m Sending ft_freqcomparison.m Transmitting file data . Committed revision 8349. @Arjen (in the CC): could this function be replaced by ft_math? If so, then I am in favor of deprecating ft_freqcomparison and documenting (in the help and with a warning) that ft_math is to be used.
Arjen Stolk - 2013-07-30 14:08:18 +0200
Hi Robert, Yes, I totally agree, and have once suggested to use ft_math over ft_freqcomparison at the mailing list. Ft_freqcomparison no longer has any use as ft_math can do it all. Yours, Arjen
Robert Oostenveld - 2013-07-30 15:00:30 +0200
then I will deprecate the function.
Arjen Stolk - 2013-07-30 15:04:53 +0200
Thanks!
Robert Oostenveld - 2013-07-30 15:58:17 +0200
(In reply to comment #3) mac001> svn commit ft_freqcomparison.m Sending ft_freqcomparison.m Transmitting file data . Committed revision 8353. I removed the documentation and added a warning % DEPRECATED by roboos on 30 July 2013 % see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2222 for more details % support for this functionality can be removed at the end of 2013 warning('FT_FREQCOMPARISON is deprecated, please use FT_MATH instead.') for the time being it still works, and the test_bug2222 script makes use of it. At the end of 2013 the function can be removed and the test script disabled.