Back to the main page.

Bug 107 - Checking for unique channel names is incompatible with not generating fake channel names for fMRI

Reported 2010-07-08 14:04:00 +0200
Modified 2011-01-12 13:09:31 +0100
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: All
Operating System: All
Importance: P1 normal
Assigned to: Stefan Klanke
Depends on:
See also:

Stefan Klanke - 2010-07-08 14:04:31 +0200

Since Rev 1330, July 1, ft_read_header contains a check for the uniqueness of channel names, which apparently became necessary for other functions (ft_channelselection). For fMRI data read from the FieldTrip buffer, channel names are meaningless and therefore not generated (also takes too long). Instead, only an empty cell array is provided as hdr.label, which yields an error when checking with "unique". It would be easy to disable the check for fMRI data, but then it's not clear how this translates to errors further along, ft_channelselection (well, for fMRI, this function would probably not be used, anyway). Also, first generating fake channel names for data from the FT buffer and then checking for uniqueness does not really fit with the idea of using ft_read_header for quick polling operations.

Stefan Klanke - 2010-12-01 17:27:06 +0100

I added a checkUniqueLabels flag a long while ago, which I set to false if the data is fMRI. In this case, uniqueness is not checked, and the labels are still an empty cell array. I suggest to only use a more complex solution (persistent array to keep things efficient) if the need arises, since I believe no one will ever need channel labels for fMRI, or call functions that do.