Back to the main page.

Bug 1984 - appendfreq should also append cumtapcnt and cumsumctn

Status CLOSED FIXED
Reported 2013-02-14 09:34:00 +0100
Modified 2019-08-10 12:42:14 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks: 2187
See also: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2285http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2187http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2186

Jörn M. Horschig - 2013-02-14 09:34:39 +0100

at the moment: freq_bsl = label: {153x1 cell} dimord: 'rpttap_chan_freq' freq: 55 fourierspctrm: [4988x153 double] cumsumcnt: [172x1 double] cumtapcnt: [172x1 double] grad: [1x1 struct] cfg: [1x1 struct] >> freq_cmb = ft_appendfreq(cfg, freq_exp, freq_bsl); freq_cmb = dimord: 'rpttap_chan_freq' label: {153x1 cell} freq: 55 fourierspctrm: [9976x153 double] cfg: [1x1 struct]


Jan-Mathijs Schoffelen - 2013-02-23 20:50:33 +0100

... and trialinfo


Diego Lozano Soldevilla - 2013-05-24 18:05:21 +0200

Now ft_appendfreq returns cumsumcnt, cumtapcnt and trialinfo meg = dimord: 'rpt_chan_freq' freq: 11.0906 cumsumcnt: [720x1 double] cumtapcnt: [720x1 double] trialinfo: [720x11 double] label: {273x1 cell} crsspctrm: [720x37128 double] cfg: [1x1 struct] Sending ft_appendfreq.m Transmitting file data . Committed revision 8155.


Diego Lozano Soldevilla - 2013-05-24 22:56:56 +0200

(In reply to comment #2) Does labelcmb subfield be checked to append it?


Jan-Mathijs Schoffelen - 2013-05-25 11:59:05 +0200

Ideally: yes. Let me know if you need help with this.


Eelke Spaak - 2013-05-28 10:15:13 +0200

Created attachment 480 test data to reproduce bug A bug has been introduced in r8155 (May 24), to reproduce see attached test data and run: ft_appendfreq(cfg, s, s, s); The error is: Undefined function or variable "iscumsumcnt". Error in ft_appendfreq (line 266) if iscumsumcnt; Error in ft_appendfreq (line 139) freq = ft_appendfreq(tmpcfg, varargin{:});


Eelke Spaak - 2013-05-28 10:17:22 +0200

Not sure if this is a good cause to rollback ft_appendfreq in the repository, let's discuss at the FT meeting. For myself I have now done: svn up -r 8144 ft_appendfreq.m to get the pre-bug version back.


Diego Lozano Soldevilla - 2013-05-28 10:36:45 +0200

(In reply to comment #6) Solved for the moment >> ft_appendfreq(cfg, s, s, s) the call to "ft_appendfreq" took 0 seconds and required the additional allocation of an estimated 0 MB ans = dimord: 'rpt_chan_freq_time' label: {2x1 cell} time: [1x71 double] powspctrm: [4-D double] cfg: [1x1 struct] >> size(ans.powspctrm) ans = 3 2 29 71 The error was because I didn't ask about all possible freq subfields for catdim=0 (line 198). Sending ft_appendfreq.m Transmitting file data . Committed revision 8159. I?l use your test data to explore all possible freq appending cases thoroughly


Robert Oostenveld - 2017-04-21 10:21:40 +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-05-02 12:36:09 +0200

There is a combined test_bug1984_2187.m script, but it does not really check the specific issue addressed here. I made a specific test script, which revealed that cumsumcnt and cumtapcnt were not properly dealt with. I improved the code and added the test script. mac011> git commit [master 196e56f] FIX - improve appending of frequency structures with cumsumcnt and cumtapcnt, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=1984 1 file changed, 90 insertions(+) create mode 100644 test/test_bug1984.m


Diego Lozano Soldevilla - 2017-05-02 14:27:30 +0200

(In reply to Robert Oostenveld from comment #9) thanks Robert!


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


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