[Mne_analysis] MNE Matlab fiff_write_coord_trans function help

Kambiz Tavabi ktavabi at uw.edu
Wed Oct 24 18:38:13 EDT 2012
Search archives:

Greetings all,
I accidently sent this email to mne_support at nmr, if you're getting this 
again, I am sorry for the duplicate.
I am trying to define a new device-to-head transformation matrix and 
either (a) over write the transformation matrix in a existing raw fif 
file or (b) write a new 'dummy' fif file. I get the impression option 
(a) is more feasible, using some of the MNE Matlab functions.
To that end I tried using the function fiff_write_coord_trans to 
overwrite a coordinate transfomation structure to a raw fif file. The 
device-to-head transformation matrix output from fiff_read_meas_info is 
of type double precision, once I make the desired changes to that matrix 
and pass the new coordinate transfomation structure to fiff_write_coord 
I get an error at line 53:

ln51-count = fwrite(fid,int32(FIFF_COORD_TRANS),'int32');
ln52-if count ~= 1
ln53-   error(me,'write failed');
ln54-end

I suspect the problem is due to mismatch between 'int32' and 'double' 
precision types. But I get the same error if I convert the 
transformation matrix to int32, not to mention the values are now quite 
different as compared to the original double precision matrix output by 
fiff_read_meas_info.  Anyone know what's going on here? or know of a fix 
or workaround?

Thanks in advance
Kambiz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ktavabi.vcf
Type: text/x-vcard
Size: 387 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20121024/36b6e20d/attachment.vcf 


More information about the Mne_analysis mailing list