DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Script problem about designing a low pass filter

Hello everyone i am trying to filter a signal named <head x acc unfiltered>

but when I want to apply the filter designed ,it shows the message about the tuple index is out of range

what is wrong with my script or how can I debug it ?

illustration of my scriptillustration of my script

 

problem show up when run the scriptproblem show up when run the script

 

0 Kudos
Message 1 of 2
(215 Views)

Hi Max,

 

The error "tuple index out of range" occurs because the array retrieved from the channel "head x acc unfiltered" has a shape that is not compatible with SciPy’s filtfilt  function. To resolve this, simply apply .flatten() to the array to ensure it is one-dimensional: 
input = np.array(oMyChn.Values).flatten()

Regards

0 Kudos
Message 2 of 2
(55 Views)