Back to the main page.

Bug 1051 - fixsens breaks on data that has coilpos & coilori but NO coilpos

Status CLOSED FIXED
Reported 2011-10-18 09:59:00 +0200
Modified 2011-10-19 15:20:24 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 major
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Stephen Whitmarsh - 2011-10-18 09:59:49 +0200

Doing nothing strange (except dealing with preprocessed data that was processed a while ago) breaks in fixsens on line 62, because line 39 = false. cheers, S


Jan-Mathijs Schoffelen - 2011-10-18 10:03:06 +0200

The statement is confusing: does it or does it not have coilpos? Also, please provide some more details: what was the main function called?


Stephen Whitmarsh - 2011-10-18 10:06:09 +0200

apologies. please see below. to be clear, I mean coilori and coilpos but NO chanpos ??? Error using ==> rmfield at 40 A field named 'pnt' doesn't exist. Error in ==> fixsens at 62 sens.elecpos = chanpos; sens = rmfield(sens, 'pnt'); Error in ==> ft_datatype_raw at 95 data.grad = fixsens(data.grad); Error in ==> ft_checkdata at 175 data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ==> ft_freqanalysis at 184 data = ft_checkdata(data, 'datatype', {'raw', 'comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); Error in ==> do_TFR_probe_gamma at 83 FFTplanar = ft_freqanalysis(cfg, planar); 40 error('MATLAB:rmfield:InvalidFieldname', 'A field named ''%s'' doesn''t exist.',field{i});


Jan-Mathijs Schoffelen - 2011-10-18 10:15:30 +0200

Are you using a workaround by reformatting the grad description by hand? I.e. adding coilpos/coilori and removing pnt? I don't know whether this is a bug, or whether it is the consequence of the gradiometer description not being complete. If you add a chanpos by hand it should just work, or not?


Stephen Whitmarsh - 2011-10-18 10:23:10 +0200

thats the thing - if i used a workaround i wouldn't report it, but i cant find my own handywork anywhere. Then i wanted to add chanpos myself but was unsure what that would have to look like?


Jan-Mathijs Schoffelen - 2011-10-18 10:44:51 +0200

it goes wrong in ft_megplanar, when the planarmontage is put into ft_apply_montage; at this point the chanpos gets lost, which is not good


Stephen Whitmarsh - 2011-10-18 10:47:40 +0200

adding an empty chanpos post hoc works for now


Jan-Mathijs Schoffelen - 2011-10-18 15:26:34 +0200

created test_bug1051