Back to the main page.

Bug 1749 - problem with ft_artifacft_zvalue

Status CLOSED FIXED
Reported 2012-09-28 10:59:00 +0200
Modified 2014-03-12 12:21:43 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 critical
Assigned to: Jörn M. Horschig
URL:
Tags:
Depends on:
Blocks:
See also:

Ayelet N. Landau - 2012-09-28 10:59:35 +0200

The function no longer works if no second argument (data) is supplied. as you can see, in the if statement on line 141, the scenario of no second argument clearly is missing the definition of the variable data. if nargin > 1 % data given as input isfetch = 1; hdr = ft_fetch_header(data); data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); elseif nargin == 1 % only cfg given isfetch = 0; hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); % check whether the value for trlpadding makes sense; negative trlpadding % only allowed with in-memory data if cfg.artfctdef.zvalue.trlpadding < 0 error('negative trlpadding is only allowed with in-memory data'); end end this then becomes a problem in line 181 where (for us, and probably many others) data is called for, for the first time for tr=1:numel(data.trial) If for some reason fieldtrip no longer supports the option of no data argument in the call for ft_artifcat_zvalue that should be made explicit in the help Otherwise, we were using this function happily and successfully on our data until the Sept 26th change thanks you! Ayelet


Jörn M. Horschig - 2012-09-28 11:49:04 +0200

hm, damn it, probably my bad, gonna fix it now. my apologies


Jörn M. Horschig - 2012-09-28 12:07:08 +0200

fixed svn ci ft_artifact_zvalue.m -m "bugfix-#1749-works again w/o data as input argument" Sending ft_artifact_zvalue.m Transmitting file data . Committed revision 6572. I'm gonna do some more checks and then send the updated file to you, so that you can continue working today :)


Jörn M. Horschig - 2012-09-28 12:25:04 +0200

svn ci ft_artifact_zvalue.m -m "enhancement-#1749-y axis scaling fixed" Sending ft_artifact_zvalue.m Transmitting file data . Committed revision 6574.