Back to the main page.

Bug 2610 - ft_timelockanalysis fails for component input data

Status CLOSED FIXED
Reported 2014-06-12 14:08:00 +0200
Modified 2019-08-10 12:28:52 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 major
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks: 2518
See also:

Eelke Spaak - 2014-06-12 14:08:19 +0200


Eelke Spaak - 2014-06-12 14:15:12 +0200

Well, that was an easy one. ft_timelockanalysis still used keyval-syntax with ft_selectdata, and the bug was (and remains) in ft_selectdata_old. I now changed line 125: data = ft_selectdata(data, 'rpt', cfg.trials); to: tmpcfg = []; tmpcfg.trials = cfg.trials; data = ft_selectdata(tmpcfg, data); [cfg, data] = rollback_provenance(cfg, data); To be fair, I find the old syntax much easier on the eye, but I'm afraid that the new one is how it's going to be :) bash-4.1$ svn commit ft_timelockanalysis.m Sending ft_timelockanalysis.m Transmitting file data . Committed revision 9617.


Robert Oostenveld - 2014-06-12 19:32:20 +0200

(In reply to Eelke Spaak from comment #1) the new one provides the updated cfg, which is important for provenance. If it were a low-level function, the old one would be ok and could be extended to also provide output. But it being a high-level function imposes the end-user function call interface format with cfg as first input on it. We don't want to branch of to different functions having different user interfaces.


Eelke Spaak - 2014-06-12 22:00:02 +0200

(In reply to Robert Oostenveld from comment #2) Yes, sorry, I totally see the rationale for the new one and agree that it's better, my remark was just an aside.


Robert Oostenveld - 2019-08-10 12:28:52 +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 describing the issue on https://github.com/fieldtrip/fieldtrip/issues.