Hi all,
Perhaps someone has come across this before, but I could not find anything in previous threads. We have removed a dead channel from our config file (BTi/4D), and it now is displayed “away” from the remaining sensors (see attached figure). Prior to refining the registration, I edited the channel file to delete this channel (A58). Following a refined automatic registration, the new display omits the deleted channel from the display. However, when clicking on the link to the raw file to review the time series and proceed with the subsequent processing of the data, I receive the error below:
** Error: Line 375: bst_memory>LoadChannelFile (line 375)
** Number of channels in ChannelFile (304) and DataFile (306) do not match. Aborting…
**
** Call stack:
** >bst_memory.m>LoadChannelFile at 375
** >bst_memory.m>LoadDataFile at 583
** >bst_call.m at 26
** >macro_methodcall.m at 37
** >bst_memory.m at 71
** >view_timeseries.m at 78
** >tree_callbacks.m at 243
** >bst_call.m at 28
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 103
**
Obviously this is somehow corrupting the native file, which prohibits display/review/ and further processing of the data. Would anyone have any insight as to what might be the problem and suggestions on how to work around it?
Thanks,
Roozbeh
Hi Roozbeh,
How did you “remove this channel from the config file”?
I think the problem is that the sensor is not removed from the config file, and not removed from the recordings.
Maybe there is a field in the 4D format that flags the channels as good or bad, but I don’t know where it would be, we don’t have the full documentation for this file format.
If you feel like doing some reverse engineering, you can check out the following functions:
brainstorm3/toolbox/io/in_fopen_4d.m
brainstorm3/toolbox/io/private/read_4d_hdr.m
You cannot just remove a channel from the channel file, because the number of channels has to stay strictly the same in the channel file and all the data files.
On the Brainstorm side, if you just leave everything the way it is and mark the channels as bad in the recordings, it should work all the way.
The only problems would be some weird displays (such as the one you posted).
http://neuroimage.usc.edu/brainstorm/Tutorials/BadChannels
To fix the channel file properly, you could set manually the real position of the missing channels (maybe an average of the 3 or 4 nearest sensors).
Cheers,
Francois
1 Like
Thank you for the detailed reply Francois. Having followed the options, it seems the simplest solution was to re-label the channel as “Misc” to update the visualization without altering the configuration. As far as I can see, all is working as it should for the remaining processing so this appears to have solved the problem.
Thanks again.
Best,
Roozbeh
Yes, this is indeed the easiest solution!