[Eeglablist] Initial conditions vector length error in ASR

ilker sönmezışık ilkersonmezisik at gmail.com
Wed May 23 06:24:12 PDT 2018


Hello,

I keep having this error message below applying ASR while using my own
calibration data (calibData, same structure as EEG)

*Code:*

EEG = clean_artifacts(EEG, 'FlatlineCriterion', 5,...

'Highpass', 'off',...

'ChannelCriterion', 0.8,...

'LineNoiseCriterion', 4,...

'BurstCriterion', 20,...

'WindowCriterion', 'off', ...

'BurstCriterionRefMaxBadChns', calibData{iMain});

*Error:*

Initial conditions must be a vector of length max(length(a),length(b))-1,
or an array with the leading dimension of size max(length(a),length(b))-1
and with remaining dimensions matching

those of x.

Error in *asr_process* (line 134)

[X,state.iir] = filter(B,A,double(data(:,range+P)),state.iir,2);

Error in *clean_asr* (line 174)

[signal.data,state] =
asr_process(sig,signal.srate,state,windowlen,windowlen/2,stepsize,maxdims,[],usegpu);

Error in *clean_artifacts* (line 219)

EEG =
clean_asr(EEG,burst_crit,[],[],[],burst_crit_refmaxbadchns,burst_crit_reftolerances,[]);
end


I tracked it down a bit and this seems to be the problem.

(Step by step)

1. My calibration data has 32 channels and it is the data input to
*“**asr_calibrate”
*function, the output of this function is *‘state’* structure variable.

2. This variable becomes an input to “asr_process” function and used while ASR
spectral weighting as *state.iir* (line 134) as seen in error above.

3. Second output of this filtering process is state.iir which came out as
the final conditions of filter delays to become initial conditions for the
next data to be filtered.

4. Next data to be filtered is my research data and losing a few channels
for being noisy, it has 29 channels. This causes the conflict (I tried with
full-32-channel-data, then after reduced size state.iir and they worked).

As a solution, I, *first*, feed full-channels-data (32) to “*clean_asr”*
and *then* using “*clean_channels”,* I remove noisy channels. I might be
contrary to ‘the cleaner calibration data the better for ASR process’. Or
would it be better to feed 29 channels as calibration data since we would
know that they are not noisy?


I have an another question regarding ASR process. I record the data using
Biosemi through Matlab, so referencing is of importance. In my main
processing, I reference the main data after ASR before ICA decomposition. It
is to avoid introducing noise to all channels in accordance with
Makoto/Nima’s advice, even tough common mode noise is an issue I want to
get rid of at first. However, “Getting rid of up to 40 dB noise by
referencing, even if my main data is not referenced yet during ASR stage of
preprocessing, I could average-reference my calibration data after HP
filtering” is what I thought and I did. Any problems with that?

Cheers,

-- 
Ilker SONMEZISIK
Medical System Engineering Course
School of Engineering, Chiba University
Tel/Fax: +81-80-2358-9346 <ilkersonmezisik at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20180523/b572f812/attachment.html>


More information about the eeglablist mailing list