Print

Print



Dear SPMers,

I have come across a problem with MEG/MRI co-registration in the newest version of SPM 12. I get the same error regardless of whether I try to co-register in the GUI or using scripts that have worked on previous versions of SPM12 (I'm afraid that I cannot be specific). I get the same problem with my new dataset and with previous datasets that have been successfully reconstructed on previous versions of SPM12. I therefore deduce that a code change of some kind has led to my current difficulties.

I copy the full error message below.

The problem seems to be that ft_plot_sens is expecting a sens.tra field with a first dimension equalling the number of sensors and the second dimension being a single non-zero value for magnetometers and two non-zero values for the gradiometers. 

In fact, for every sensor the second dimension of sens.tra is a 510 element vector none of which are zero. For example, in one file sens.tra(1,:) begins 
-0.0246    0.0246    0.0032   -0.0032   -0.0000   -0.0018    0.0018    0.0061   -0.0061   -0.0000  

sens.tra(2,:) begins
0.0032   -0.0032   -0.0198    0.0198    0.0000    0.0084   -0.0084   -0.0085    0.0085   -0.0000

I presume that  there has been some kind of translation of the zero values that has been overlooked.

Does anyone know what has changed, and how I can go about fixing this problem? I'm happy to provide an example dataset.

Best wishes,

Thomas


error message:

undoing the custom balancing for the gradiometer definition
Warning: copying input chantype to montage 
> In plotting/private/ft_apply_montage at 111
  In plotting/private/undobalancing at 37
  In ft_plot_sens at 134
  In spm_eeg_inv_checkdatareg at 84
  In spm_eeg_inv_datareg_ui at 185
  In spm_eeg_inv_imag_api>DataReg_Callback at 80
  In spm_eeg_inv_imag_api at 53 
Warning: copying input chanunit to montage 
> In plotting/private/ft_apply_montage at 129
  In plotting/private/undobalancing at 37
  In ft_plot_sens at 134
  In spm_eeg_inv_checkdatareg at 84
  In spm_eeg_inv_datareg_ui at 185
  In spm_eeg_inv_imag_api>DataReg_Callback at 80
  In spm_eeg_inv_imag_api at 53 
Error using ft_plot_sens (line 220)
cannot work with balanced gradiometer definition

Error in spm_eeg_inv_checkdatareg (line 84)
ft_plot_sens(sensors, 'chantype', unique(lower(D.chantype(D.indchantype(modality)))), 'edgecolor', [0 1 0]);

Error in spm_eeg_inv_datareg_ui (line 185)
        spm_eeg_inv_checkdatareg(D);

Error in spm_eeg_inv_imag_api>DataReg_Callback (line 80)
handles.D = spm_eeg_inv_datareg_ui(handles.D);

Error in spm_eeg_inv_imag_api (line 53)
        feval(varargin{:}); % FEVAL switchyard
 
Error while evaluating uicontrol Callback