ctf file issues

Hello MNE Experts,

In trying to deal with CTF files for the first, time I'm running into some
issues that I don't understand and hope someone can easily help with. I
used the mne_ctf2fiff command to convert to fiff, but I can't visualize
the resulting file in mne_browse_raw (it loads without error but just
looks blank). Similarly, all the steps for loading a segment of the file
as raw data in mne_python work without error, until I do "raw.plot()",
when I get this error:

In [20]: raw.plot()

Hi Will,

In mne_browse_raw you need to create channel selections suitable for the CTF data to display them. There is a file $MNE_ROOT/share/mne/mne_browse_raw/mne_browse_raw_CTF_275.sel which contains selections for the 275-channel CTF system.

- Matti

Hi will,

could you share a small snippet (e.g. 100 ms) of your data like that:

raw.crop(None, 0.1)
raw.save('my-ctf-raw.fif')

I suspect there is some channel type in your data whic is not classified as
one of these:

['eeg', 'eog', 'ecg', 'emg', 'ref_meg', 'stim', 'resp', 'misc', 'chpi',
'syst', 'ias', 'exci']

Maybe your reference channels are not marked as such.
You could try to identify them by name and remove them just for the purpose
of plotting using

`raw.drop_channels(channel_names)`

Best,
Denis

Thanks Matti. You're right, of course. When I invoke mne_browse_raw this way:

mne_browse_raw --digtrig UPPT001 --sel
$MNE_ROOT/share/mne/mne_browse_raw/mne_browse_raw_CTF_275.sel

I can open the raw file and view the traces. It also looks like the entire
6-min run is continuous, even though it was acquired in short event-keyed
epochs, so no need for an additional concatenation step I guess.

Thanks again!

-Will

Hi Denis,

Thanks for the suggestions, and for being willing to take a look at a
snippet of data. Unfortunatley, when I run the first command you have as
written, this happens:

Hi Will,

sorry for the confusion.

This line would work (crop makes a copy by default and `None` is only valid
for Epochs and Evokeds):

raw.crop(0, 0.1, copy=False)
raw.save('my-ctf-raw.fif')

# should fit into an email as attachment

Since I don't know the CTF system very well the channels don't help as
such. It's more relevant what's in the raw.info dict, actually the type
information used inside the plotting routine is not inferred from the
channels names.

Denis

Hi Will,

I meanwhile opened an issue on github. People interested in the solution
can follow the development there.

Best,
Denis

hi Will,

I just fixed the pb on current master. The fix will be included in
v0.8.1 in a few days.

https://github.com/mne-tools/mne-python/commit/597681d9a7f9516bc8275053001b070f02f287a2

Alex

Very nice, Alex. Thank you!

-Will