Skip to content

Signal processing(signal.sosfilt) won't work using recording_queue.py #1

@scatter1

Description

@scatter1

Data from my_queue.to_array() can be plotted with plt.plot. However, signal processing routine won't work.
Can you help me?

plt.figure(figsize=(10,6))
plt.subplot(3,1,1)
plt.plot(my_queue.to_array())

sos_rr = signal.butter(4, 0.4, 'lowpass', fs=int(1000), output='sos')
sos_hr= signal.butter(4, [0.8,2.5], 'bp', fs=int(1000),output='sos')

filtered_hr = signal.sosfilt(sos_hr, data1[0:20000])
filtered_rr = signal.sosfilt(sos_hr, my_queue.to_array())

plt.subplot(3,1,2)
plt.plot(filtered_hr)
plt.subplot(3,1,3)
plt.plot(filtered_rr)
plt.show()

Every thing works OK except signal process routine...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions