Back to the main page.
Bug 1894 - ft_xxxplot does not work anymore after updating
Status | CLOSED FIXED |
Reported | 2012-12-14 12:10:00 +0100 |
Modified | 2012-12-17 10:44:37 +0100 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | PC |
Operating System: | Linux |
Importance: | P3 blocker |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Niels Kloosterman - 2012-12-14 12:10:48 +0100
Created attachment 393 neuromag freq structure that gives an error when trying to use ft_plot When I try to use ft_singleplotTFR with a freq structure (made a few months back) I get the following error. Before updating it worked fine. See attached freq structure to replicate the error. ft_singleplotTFR(cfg,freq) 199 tmp = sum(abs(grad.tra),2); Reference to non-existent field 'tra'. Error in ft_chantype (line 199) tmp = sum(abs(grad.tra),2); Error in ft_datatype_sens (line 150) sens.chantype = ft_chantype(sens); Error in ft_datatype_freq (line 104) freq.grad = ft_datatype_sens(freq.grad); Error in ft_checkdata (line 204) data = ft_datatype_freq(data); Error in ft_singleplotTFR (line 99) data = ft_checkdata(data, 'datatype', 'freq'); Cheers, Niels
Robert Oostenveld - 2012-12-17 09:08:39 +0100
I can reproduce the error with revision 7184 and >> ft_singleplotTFR([], freq) Reference to non-existent field 'tra'. Error in ft_chantype (line 199) tmp = sum(abs(grad.tra),2); Error in ft_datatype_sens (line 150) sens.chantype = ft_chantype(sens); Error in ft_datatype_freq (line 104) freq.grad = ft_datatype_sens(freq.grad); Error in ft_checkdata (line 204) data = ft_datatype_freq(data); Error in ft_singleplotTFR (line 98) data = ft_checkdata(data, 'datatype', 'freq');
Robert Oostenveld - 2012-12-17 09:09:52 +0100
(In reply to comment #1) and with >> ft_datatype_sens(freq.grad) Reference to non-existent field 'tra'. Error in ft_chantype (line 199) tmp = sum(abs(grad.tra),2); Error in ft_datatype_sens (line 150) sens.chantype = ft_chantype(sens);
Robert Oostenveld - 2012-12-17 10:21:39 +0100
It was due to chantype assuming that grad.tra would exist, but there seem to be cases where it does not exist. mac001> svn commit test/test_bug1894.m fileio/ft_chan*m Sending fileio/ft_chantype.m Sending fileio/ft_chanunit.m Adding test/test_bug1894.m Transmitting file data ... Committed revision 7208.