I was trying to import a signal free recording to estimate the noise covariance and use it for my spike data and I am getting the following error message while opening the imported data:
** Error: Line 355: bst_memory>LoadChannelFile at 355
** Number of channels in ChannelFile (44) and DataFile (1) do not match. Aborting…
**
** Call stack:
** >bst_memory.m>LoadChannelFile at 355
** >bst_memory.m>LoadDataFile at 545
** >bst_call.m at 26
** >macro_methodcall.m at 37
** >bst_memory.m at 68
** >view_timeseries.m at 63
** >tree_callbacks.m at 236
** >bst_call.m at 28
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 107
**
Is there only one channel of data in the file you imported?
Is it in the same format and coming from the same acquisition system as you epilepsy recordings?
All the recordings in the same database folder have to be compatible in terms of number of channels: they all have to match the number of channels defined in the channel file.
Note that the recordings you use for the noise covariance estimation have to pre-processed exactly in the same way as the recordings you want to study.
Both the data are coming from the same acquisition but this new raw data has one more channel in addition to those found in the epilepsy recordings.
I have tried to “remove” this one channel by marking it as a bad channel but seems it’s not removing it.
Will there be a means to remove this additional channel?
Marking a channel as bad does not remove it from the recordings, hence doesn’t solve the problem.
One option is to manually remove the extra channels:
right-click on the file to edit > File > Export to Matlab > “data”
in your Matlab command window, type “data(i, = [];”, where i is the index (or the indices) of the channels to remove
right-click on the file again > File > Import from Matlab > “data”
There are more sophisticated/automated ways to do that, but they require much more work…
Note that the error message you reported previously shows only ONE channel in the data file, not one EXTRA channel. So you may have some problems while importing the file as well.
As recommended I tried to delete this channel as follows:
data.F(27,:)=[];
data.ChannelFlag(27)=[];
Then after importing it and trying to compute the noise covariance from recordings, I received the following error message:
** Error: Line 334: bst_noisecov>ReadRecordings at 334
** Number of channels is not constant.
**
** Call stack:
** >bst_noisecov.m>bst_noisecov/ReadRecordings at 334
** >bst_noisecov.m at 248
** >tree_set_noisecov.m at 62
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@tree_set_noisecov,bstNodes,‘Compute’) at 1927
**
You have to make sure that all the files you are using for the calculation of the noise covariance matrix have the same number of channels. You have at least one that has a different number of channels, or maybe a different configuration of channel types (only if you have multiple channel files).
To review the types of the channels, right-click on the channel file > Edit.
If you cannot find our what your error is, you can send me your subject, I will have a look at it later this week.
Right-click on the subject > File > Export subject.