Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Real-time processing
#6
My signal is a breath's signal (cycles of a sort of sinusoid) sampled at 100Hz. I've got a signal 22296 samples long. My task is to evaluate it as if it was real-time as a continuous stream of data sensed by a sensor but in this case I've got it already recorded, how can I simulate a real-time acquisition starting from this pre-recorded signal?. I thougth about using a while True cycle to get 1 sample at time and getting data I already have from a csv file (this file in each row the value measured by the sensor according to the sample frequency chosen). Does it make sense?
The objective is then set a treshold, calculated as the mean value of the signal above a window of 20s, and then use this value to make a choice: if sample>treshold -> inspiration phase, if sample<treshold ->expiration phase. If the last condition is met I have to find a way to detect the end of expiration phase which corresponds to the minimum of the curve. In order to find it I need to make a comparison between one sample and the successive sample (using diff), but I also need to take into account unavoided artifacts that can induce me to consider one sample as the minimum because the difference is negative while next one difference is positive. The treshold needs to be refreshed too after a set time.
Reply


Messages In This Thread
Real-time processing - by tagalog - Oct-03-2020, 05:59 PM
RE: Real-time processing - by Larz60+ - Oct-03-2020, 09:46 PM
RE: Real-time processing - by tagalog - Oct-05-2020, 10:51 AM
RE: Real-time processing - by DeaD_EyE - Oct-05-2020, 04:08 PM
RE: Real-time processing - by Larz60+ - Oct-05-2020, 04:08 PM
RE: Real-time processing - by tagalog - Oct-06-2020, 03:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Non-blocking real-time plotting slow_rider 5 3,797 Jan-07-2023, 09:47 PM
Last Post: woooee
  Real time database satyanarayana 3 1,722 Feb-16-2022, 01:37 PM
Last Post: buran
  Real time data satyanarayana 3 27,389 Feb-16-2022, 07:46 AM
Last Post: satyanarayana
  Real time Detection and Display Gilush 0 1,818 Feb-05-2022, 08:28 PM
Last Post: Gilush
  Real-Time output of server script on a client script. throwaway34 2 2,100 Oct-03-2021, 09:37 AM
Last Post: ibreeden
  Why recursive function consumes more of processing time than loops? M83Linux 9 4,352 May-20-2021, 01:52 PM
Last Post: DeaD_EyE
  Real Time Audio Processing with Python Sound-Device not working Slartybartfast 2 4,056 Mar-14-2021, 07:20 PM
Last Post: Slartybartfast
Question I can't get my real-time chart with Python (Help!) Bastian_ElProfe 1 2,260 Jan-20-2021, 01:34 PM
Last Post: wostan
  Real Time signal processing tagalog 2 2,708 Dec-12-2020, 05:23 AM
Last Post: tagalog
  Real time MIDI with python eythoralex 1 3,513 May-19-2020, 07:17 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020