Description
Hi,
as far as I could see it, there is currently no way to add back the online reference during the pipeline. In order to base the average reference on N + onlineRef channels I simply added onlineRef to params.referenceChannels and entering N in params.evaluationChannels. onlineRef is just a vector of zeros. The pipeline stopped with a matrix dimension mismatch error. This was because PREP checks also referenceChannels to be usable (in findUnusableChannels(signal, referenceOut.referenceChannels)), which is a good idea, but will at the end produce the error when reindexing channels that are not bad and one or more reference channels that are found to be bad but do not occur in evaluation channel list.
signal.data(targetChannels, :) = signaltemp.data(reindex, :);
line 53 of interpolateChannels
I think simply replacing referenceChannels by evaluationChannels in findUnusableChannels is not a good idea as the reference signal should be clean.
Is there another to do it?
Best, Norman