I’ ve just downloaded the latest BST version (11/27), I tried to calculate the noise covariance, as usual, using a raw recording (16000 samples, 31.9 sec), block by block, full noise cov, I get the following error:
** Error: Line 53: isfield
** Not enough input arguments.
** Call stack:
** >bst_avgref.m at 53
** >in_bst_data.m at 159
** >bst_noisecov.m>bst_noisecov/ReadRecordings at 313
** >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 1938
I then tried with other files in other subjects, same
This is a small bug I introduced one or two days ago to improve the processing of the average reference in the case of multiple implanted grids/strips.
It should be fixed now. Please update brainstorm and try again.
Btw, if you are interested in calculating the average reference separately for different groups of electrodes (type SEEG or ECOG), you can define subgroups with the “Comment” fields in the channel file.
Right-click on the channel file > Edit channel file.
Select the 1st sub-group of electrodes: right-click > Set comment > “name_of_group_1”.
Same for all the subgroups. All the channels of one type (SEEG or ECOG) have to bet classified to have this separate average reference working. You should see a message in the command window if this classification works when the bst_avgref functions is called. It is not formerly documented yet, but will be soon.