Trouble convertig 4D to .fif continued --- import / export open MEG format?

Dear MNE's

I'm currently having trouble converting my 4D data to fif. Obviously,
something is wrong about the files written by the 4D-software's
converter that I submitted to the mne_insert_4D_comp. Unfortunately
the documentation does not tell, how the files submitted should look
like. I guess it is something about the fif data, as the program
returns the same output -- just for 248 sensors -- if I exclude the
reference channel.

I also wonder whether there is a way to create fif files or export
data from MNE based on an open format, e.g. hdf5. This would be very
helpful as it would allow me to plug the MNE software into our site's
data-processing workflow.

Any comments or hints are highly appreciated.

http://dpaste.com/763670/

OR

me at localhost (61):mne_insert_4D_comp --in test_204743.fif --out
test_output_204743.fif --ref test_204743ref.data

mne_insert_4D_comp version 1.2 compiled at Dec 21 2009 19:51:37

helmet channel data file : test_204743.fif
reference channel data file : test_204743ref.data
output data file : test_output_204743.fif

Read 271 sensor positions from
/myhome/MNE-2.7.0-3106-Linux-i686/share/mne/Magnes_WH3600.pos
248 MEG channel infos read from test_204743.fif
All channels matched.
To large difference in matching : 1.0 > 1.0 mm

hi,

I'm currently having trouble converting my 4D data to fif. Obviously,
something is wrong about the files written by the 4D-software's
converter that I submitted to the mne_insert_4D_comp. Unfortunately
the documentation does not tell, how the files submitted should look
like. I guess it is something about the fif data, as the program
returns the same output -- just for 248 sensors -- if I exclude the
reference channel.

I don't know about this. Matti is probably the best person to answer this one.

I also wonder whether there is a way to create fif files or export
data from MNE based on an open format, e.g. hdf5. This would be very
helpful as it would allow me to plug the MNE software into our site's
data-processing workflow.

you can write hdf5 from matlab or python. Writing the data is easy. It might
be more complicated to store the measurement info structure (or
dictionary in python).
Note that moving away from the fif format will make things difficult to go
all the way to the inverse problem and source estimation.

let me know if you need help with that.

Alex

So far thanks to all for the helpful replies!

you can write hdf5 from matlab or python. Writing the data is easy. It might
be more complicated to store the measurement info structure (or
dictionary in python).
Note that moving away from the fif format will make things difficult to go
all the way to the inverse problem and source estimation.

Sure, I would stick with fif files for that part, hopefully I will
succeed in creating those soon.
The idea is to pipe data which were preprocessed externally to the mne
software or to export mne data for external processing.
The first one seems more obscure to me. As you indicated the second
one should be feasible via Python.
It just would be nice (comparability of data from different sites,
software packages, etc.) to feed the MNE / mne-python with data of
arbitrary origin, e.g., whatever goes into a suitably shaped numpy
ndarray with info from some header object... something like Nibabel
for EEG/MEG.
Apparently the "hot part" depends om the fif files, which makes this
one non-trivial, I guess.

Thanks,
Denis

Hello,

Denis sent me the data files and I will find out what the trouble with the conversion is. Once I have figured that out I will post the solution on the list.

- Matti

Sure, I would stick with fif files for that part, hopefully I will
succeed in creating those soon.
The idea is to pipe data which were preprocessed externally to the mne
software or to export mne data for external processing.
The first one seems more obscure to me. As you indicated the second
one should be feasible via Python.

tell me if you need help with that. It's < 10 lines to do such IO.

It just would be nice (comparability of data from different sites,
software packages, etc.) to feed the MNE / mne-python with data of
arbitrary origin, e.g., whatever goes into a suitably shaped numpy
ndarray with info from some header object... something like Nibabel
for EEG/MEG.

indeed but it's much more complicated than for MRI. Take a look at
a measurement info structure in matlab or python to get an idea.
Matti has done a huge job to be able to convert a lot of MEG data
to fif for easy integration with MNE. We don't have the man power
currently to redo this in Python.

If you just want to get the data and stay in sensor space then it becomes easy
but it's too limited.

Apparently the "hot part" depends om the fif files, which makes this
one non-trivial, I guess.

indeed?

Alex