Back to the main page.
Bug 1473 - ft_denoise_pca: crash in trial mode
| Status | CLOSED FIXED |
| Reported | 2012-05-11 14:22:00 +0200 |
| Modified | 2019-08-10 11:55:52 +0200 |
| Product: | FieldTrip |
| Component: | preproc |
| Version: | unspecified |
| Hardware: | PC |
| Operating System: | Windows |
| Importance: | P3 normal |
| Assigned to: | |
| URL: | |
| Tags: | |
| Depends on: | |
| Blocks: | |
| See also: |
Tilmann Sander-Thommes - 2012-05-11 14:22:13 +0200
The following code crashes: ... Dat = ft_preprocessing(cfg); % trials are read cfg.pertrial = 'yes'; cfg.channel = ... cfg.refchannel = ... cfg.trials = 'all'; Dat = ft_denoise_pca(cfg, Dat) in ft_denoise_pca (l. 93) -> ft_appenddata (l. 74) -> ft_checkdata (l. 307) "This function requires raw data" Solution: Replacing in ft_denoise_pca ... tmp = cell(numel(varargin{1}.trial)); for k = 1:numel(varargin{1}.trial) tmpcfg.trials = k; tmp{k,1} = ft_denoise_pca(tmpcfg, varargin{:}); end ... with ... tmp = cell(numel(varargin{1}.trial,1)); % ,1 added !!!! for k = 1:numel(varargin{1}.trial) tmpcfg.trials = k; tmp{k} = ft_denoise_pca(tmpcfg, varargin{:}); % ,1 removed !!!! end ... solves the problem. I will submit this solution Monday, if there is no objection.
Tilmann Sander-Thommes - 2012-05-14 11:20:15 +0200
Problem was already solved in newer version, sorry ... I close the bug.
Robert Oostenveld - 2019-08-10 11:51:56 +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.