Back to the main page.

Bug 2187 - ft_appendfreq does not give a freq in output

Reported 2013-06-04 16:27:00 +0200
Modified 2019-08-10 12:40:49 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Robert Oostenveld
Depends on: 19843287
See also:

Eelke Spaak - 2013-06-04 16:27:40 +0200

Created attachment 481 data to reproduce bug Which crashes stuff like freqstatistics etc. To reproduce, load data in attachment and: x = ft_appendfreq([], s, s) Diego, could this be due to one of your changes?

Diego Lozano Soldevilla - 2013-06-04 16:40:58 +0200

If I run as you propose, it crashes because cfg.parameter is required >> load('testdata.mat') >> x = ft_appendfreq([], s, s) Warning: -clear > In utilities/private/warning_once at 116 In utilities/private/ft_preamble_init at 26 In ft_preamble at 54 In ft_appendfreq at 58 Error using ft_checkconfig (line 150) The field cfg.parameter is required Error in ft_appendfreq (line 70) cfg = ft_checkconfig(cfg, 'required', 'parameter'); If one append the powspctrm, yes the freq is not appended. To avoid a crash before freqstatistics I suggest you to use ft_freqgrandaverage: cfg=[]; cfg.keepindividual='yes'; gavg = ft_freqgrandaverage(cfg,s,s,s...) Then the output dimord is used in ft_appendfreq to work properly. I'll have a look to do it as you suggest

Eelke Spaak - 2013-06-04 16:44:45 +0200

(In reply to comment #1) Yes, sorry, the cfg.parameter should have been there of course. I simply reverted ft_appendfreq to an earlier revision, so I don't have any trouble. (But that solution of course won't work for people working with the /home/common/-release) Of course it should remain possible for people to do ft_freqstatistics(cfg, dataset{:}); instead of having to call freqgrandaverage first.

Diego Lozano Soldevilla - 2013-06-04 17:08:43 +0200

(In reply to comment #2) Fine with me I went back to the before-fix ft_appendfreq version but I cannot commit it svn up -r 8144 ft_appendfreq.m Do you know a way to updated commit the 8144 revision to have it at the home/common folder? I can copy-paste but I'd like to know if there's a more elegant workaround

Diego Lozano Soldevilla - 2013-06-05 15:27:14 +0200

(In reply to comment #3) Hi Eelke, I made a minor change in ft_appendfreq and I created test fucntion +data and updated the test_ft_appendfreq and no errors so far: Sending ft_appendfreq.m Transmitting file data . Committed revision 8187. Adding test_bug1984_2187.m Adding (bin) test_bug1984_2187.mat Sending test_ft_appendfreq.m Transmitting file data ... Committed revision 8188. Could you please try to test the code with your data? then I can continue adding the grad, chamcmb and other fields

Robert Oostenveld - 2017-04-21 10:21:20 +0200

Arjen implemented ft_append_sens and made changes to ft_append_data. This made the inconsistency between appending data/timelock/freq very obvious. Please note that there is also an ft_appendsource, but I won't be looking at that one now.

Robert Oostenveld - 2017-04-25 14:45:54 +0200

test_bug1984_2187 (still) runs without problems, so I assume that this is solved

Robert Oostenveld - 2019-08-10 12:34:39 +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

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