Back to the main page.

Bug 2809 - ft_freqstatistics produces error when cfg.frequency only has one numeric element

Status CLOSED FIXED
Reported 2015-01-20 22:58:00 +0100
Modified 2019-08-10 12:30:40 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks:
See also:

Omar Mian - 2015-01-20 22:58:28 +0100

Created attachment 692 Section of code copied from: http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq According to the tutorial on cluster-based permutation tests for time-frequency data, ft_freqstatistics should be able to work if cfg.frequency contains just one numeric element. The tutorial code assumes this is the case by using cfg.frequency = 20. http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq However, when the tutorial code is run (attachment), an error is produced in ft_freqstatistics. It appears to require at least two elements in cfg.frequency. Test data called in attached script: ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/cluster_permutation_freq/dataFC.mat ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/cluster_permutation_freq/freqFIC_planar_cmb.mat ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/cluster_permutation_freq/freqFC_planar_cmb.mat


Eelke Spaak - 2015-01-21 15:31:50 +0100

Thanks for spotting this bug. I just fixed and committed it to SVN: bash-4.1$ svn commit test/test_tutorial_clusterpermutationfreq.m ft_freqstatistics.m Sending ft_freqstatistics.m Sending test/test_tutorial_clusterpermutationfreq.m Transmitting file data .. Committed revision 10116. The fix should be in the FTP release as of midnight tonight.


Robert Oostenveld - 2015-01-23 13:17:37 +0100

(In reply to Eelke Spaak from comment #1) bummer! I had this fixed in a different manner in a development branch on my git account, but now you beat men to this and I have to merge your changes with mine :-(


Robert Oostenveld - 2015-01-28 12:22:22 +0100

(In reply to Robert Oostenveld from comment #2) please note that I just committed a large set of changes, which overrule the small change by Eelke. A single number for cfg.frequency should still be supported, though. See bug 2795 for details.


Robert Oostenveld - 2019-08-10 12:30:40 +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.