Repository navigation
Conversation
|
can you share a dataset to test? |
|
Sure, how do I do this? I mean, shall we optionally provide a mini data set On Mon, Dec 10, 2012 at 11:00 AM, Alexandre Gramfort <
|
Maybe so the script can be easily tested not only by you. |
|
I had in mind something like a fiff file exported by the solaris routine On Mon, Dec 10, 2012 at 11:12 AM, Alexandre Gramfort <
|
|
yes. We need to figure out how to add this to the test suite. Let's keep it |
|
I knew there was something, currently we don't test them, right? On Mon, Dec 10, 2012 at 11:24 AM, Alexandre Gramfort <
|
|
TODO
|
|
Also NOTE:
|
|
Reference channels updated. As far as I can tell for the moment, with regard to reference channels, this script inserts the channels and renames them. However, it currently does not position the compensation channels, nor does it calculate or apply compensation weights. As a result the comp channels are in, but the info is incomplete. Actually completing this should be doable. As far as I know (see #96) mne uses the same routine for ctf and bti systems and mne-python currently already handles the ctf compensations. Adding the ref-channels positions correctly might be non-trivial, depending on whether it is more then just translating and rotating. At least one can tell that the Magnes3600WH .pos file used by mne won't work for the magnetometer systems (see discussion on MNE analysis around june / july this year). My advice would be to currently block the ref channels or add a warning, unless we don't at least support inserting the ref channels correctly so that people could use the other mne commands to complete the ensuing fiff file. Wdyt? |
|
Actually @mshamalainen might help us here. If he could tell us how the mne_4d_insert comp matches the ref channel positions from the ascii file with the helmet channel positions from the fiff file. If it is just about applying the transformations we can easily include this step here. |
|
So it seems I was able to resolve some mysteries about the compensation channels. Besides a warning that it is experimental we should be fine including them and just applying the regular transformations applied to other channels. The user then would not need to use mne_4D_insert_comp. We can then later support compensation handlng. |
|
Just added reference channel support. I will make available a test data set tomorrow in the course of the day. |
- this is a WIP please don't merge. Despite it's almost ready some tests are pending. - Early / generic feedback is welcome however. Finally, we are there. Some info for the others: The script resembles the solaris export_fiff program once available for Solaris workstations. Instead of the hierarchical binary data files it processes the header and ascii files produced by different MSI routines, namely 'export_data' which produces xxx.data (binary: time slices x channels) xxx.hdr and ascii header file, 'sensor_transformer' which writes the general device to head transform into x.transform, and 'dump_hs' wihch writes the digitization points into a x.hs. As a consequence of the ascii export the precision is about 4-5 decimals. The script allows to compensate for a sensor frame misalignment between the default mne MagnesWH3600 settings reported for some Systems. Also the default translation can be set.
…ke rescaling of data optional.
- Adding tags 4003-4005 to fiff.constants.py (MNE manual pp. 108) - Adding Magnes reference channels definitions to import script - Fixing bug about coordinate frame. I now is head if no appropriate transform is present and device if it is present. This should now write a fiff at the same level of completeness as after mne_insert_4D_comp but without 'guessing' the transform from Magnes3600WH.pos; the locations should actually be more appropriate.
|
I will close this PR in soon. Current status is still experimental, but promising. The source reconstructions drawn from this routine look valid and after another testing iteration over the geometries, the behavior seems valid. However, I found a way to read directly from bti binaries, this will presumably allow us to operate on the data in a lossless fashion and take full advantage of the coordinate transforms elaborated here. The script exposed her will move to a gist. I will continue on this with a new PR focussing on extending our fiff module by a bti submodule. |
|
Despite #385 I'll keep this open, since a script would be handy and the option parser is already there. |
|
Continued on #385 |
Finally, we are there. Some info for the others:
The script resembles the solaris export_fiff program once available for Solaris workstations. Instead of the hierarchical binary data files it processes the header and ascii files produced by different MSI routines, namely 'export_data' which produces xxx.data (binary: time slices x channels) xxx.hdr and ascii header file, 'sensor_transformer' which writes the general device to head transform into x.transform, and 'dump_hs' wihch writes the digitization points into a x.hs. As a consequence of the ascii export the precision is about 4-5 decimals. The script allows to compensate for a sensor frame misalignment between the default mne MagnesWH3600 settings and some particular Magnes3600WH Systems. Also the default translation can be set.