Back to the main page.

Bug 1508 - ft_freqanalysis does not produce proper error when cfg.channel consists of names not present in the data

Status CLOSED FIXED
Reported 2012-06-07 12:09:00 +0200
Modified 2012-08-23 14:02:07 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: All
Importance: P3 normal
Assigned to: Jörn M. Horschig
URL:
Tags:
Depends on:
Blocks:
See also:

Stan van Pelt - 2012-06-07 12:09:25 +0200

When calling ft_freqanalysis with channel names (in cfg.channel) that do not exist in the data, an error is only produced when ft_freqanalysis is analysing the second trial (so, not right from the first trial): the input is raw data with 286 channels and 101 trials processing trials trial 1, frequency 61 (60.00 Hz), 3 tapers??? Error using ==> reshape To RESHAPE the number of elements must not change. Error in ==> ft_freqanalysis at 640 spectrum = reshape(permute(spectrum_mtmconvol(:,:,freqtapind{ifoi}),[3 1 2]),[ntaper(ifoi) nchan 1 ntoi]); For reproducability, I've put a dataset and m-file in /home/common/temporary/4FT.


Jan-Mathijs Schoffelen - 2012-06-08 07:35:46 +0200

generally, uploading stuff to /home/common/temporary is not a good idea, because it is not guaranteed that anybody will fetch the data from there before it 'expires'. Please upload at least the script/cfg to the bugzilla website. If it is a general problem, the thing should be reproducible on any MEG dataset.


Jan-Mathijs Schoffelen - 2012-06-10 10:28:24 +0200

testscript created fieldtrip/test/test_bug1508, don't know whether this exactly reproduces the issue; at least it crashes, but already on the first trial ;-)


Jörn M. Horschig - 2012-07-04 13:57:46 +0200

Hey Stan, I fixed it by throwing an error when cfg.channel is empty. Can you check an verify with your data/script again? If the error persists, let me know and I'll get back to this issue again. Sending ft_freqanalysis.m Transmitting file data . Committed revision 6218.


Jörn M. Horschig - 2012-08-23 14:02:07 +0200

bug closing time (http://www.youtube.com/watch?v=xGytDsqkQY8)