Skip to content

chrisroedig/pydacq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYDACQ

Thread safe continous data acquisition and display framework. Mainly an excersize in thread safe techniques. This package allows the decoupling of data acquisition vs. UI response timeframes. When acquiring data, the polling routine should never be blocked by downstream data handling. Likewise a UI or live analysis routine should not be block by data acquisition. This packages provides thread safe data FIFO queues and buffers to fully decouple data acquisition from the UI while providing shared data access, streaming and processing.

Dependecies

  • numpy
  • pyqtgraph (for examples)

Testing

python -m unittest discover -v

Examples

  • example_random.py plot from a continously running rand generator
  • example_sensorlog.py plt data polled (TCP/IP) from SensorLog iphone app

Classes

PollingAquisition

Acquires data in read polling callback. The incoming data is buffered and shipped out of the queue by an overridable write callback.

RollingBuffer

Maintains a stack of numpy arrays with thread safe read/write operations. Buffer has a fixed length and advances by one when new data is added, the oldest data drops off the end of the buffer. This is useful for providing strip-chart type displays of polled data.

About

continuous threaded data acquisition in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages