Hi Vladimir, I'm having a problem with this function:
SPM12: spm_eeg_correct_sensor_data (v6054) 20:49:41 - 25/03/2016
========================================================================
Error using ft_prepare_vol_sens (line 110)
inconsistency in the units of the volume conductor and the sensor
array
Error in spm_eeg_lgainmat (line 75)
[vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel',
forward(ind).channels);
Error in spm_eeg_correct_sensor_data (line 112)
[L, D] = spm_eeg_lgainmat(D, [], label);
If I check the error in ft_prepare_vol_sens I find headmodel.unit is in 'm' and sens.unit is in 'mm', creating the mismatch.
However, I can't seem to be able to change the sensor units. I tried converting to m using ft_convert_units. This seems to work and creates a sensor struct in m. However, when I try to put this into the MEEG object using D=sensors(D,'MEG',new_sensors) it retains 'mm' despite other fields changing.
I guess this is not the solution. I used this function previously many times with spm8 but hadn't tried it under spm12 till now, so I guess there is some difference. Any ideas?
Many thanks, Paul
|