help > RE: error during temporal analysis
Jun 6, 2017  12:06 PM | Sungho Tak - Wellcome Trust Centre for Neuroimaging, UCL
RE: error during temporal analysis
Dear Ralf, 

Thank you for using the SPM-fNIRS toolbox for your research. 

As described in the error message, a type or order of filter may not be optimal for stopband frequencies that you used. SPM-fNIRS toolbox uses a 5th-order Butterworth filter by default. 

The attached code uses a finite impulse response (FIR) filter when the reported error occurs. An order of FIR filter is calculated from stopband frequencies. 

I hope this helps your research. 

Best wishes, 

Sungho 
Originally posted by Ralf Veit:
Dear Sungho,

We are using your nice spm-fnirs toolbox and we got the same error message as reported by Victor. We used the defaults bandstop filters 0.12 0.5 and 0.7 1.5. The data was recorded with 50Hz but we resampled it to 10 Hz. Below is the error message.
Apply a temporal filter to hemoglobin changes...
Error using filter_with_correction (line 51)
Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter.
Error in filter_with_correction (line 51)
error('Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff frequency or a different type/order of filter.');
Error in ft_preproc_bandstopfilter (line 283)
filt = filter_with_correction(B,A,dat,dir,usefftfilt);
Error in spm_fnirs_preproc (line 115)
for j = 1:nf, Y = ft_preproc_bandstopfilter(Y', P.fs, P.K.C.cutoff(j,:), forder, ftype, fdir)'; end

Any help will be welcome
Best
Ralf

Threaded View

TitleAuthorDate
Li Zhu Feb 18, 2017
Wenhai Zhang Aug 24, 2017
Wenhai Zhang Aug 23, 2017
Sungho Tak Aug 24, 2017
Sungho Tak Feb 19, 2017
Ralf Veit May 4, 2017
RE: error during temporal analysis
Sungho Tak Jun 6, 2017
Ralf Veit Jun 6, 2017