Coder Social home page Coder Social logo

ssepulveda / rtgraph Goto Github PK

View Code? Open in Web Editor NEW
52.0 11.0 34.0 133 KB

A simple Python application for plotting and storing data in real time

License: MIT License

Makefile 1.36% Python 98.64%
python plotting python-application pyqtgraph qt multiprocessing pyserial

rtgraph's Issues

Spectrogram / waterfall type visualization

Hi there,
I'm investigating how to build a simple spectrogram / waterfall type visualization.
It seems that RTGraph could be adapted to provided this functionality.
However, the visualization that needs to be obtained at the end is more a 2D image than 1D signals as shown in the talk and proceedings.

Do you think it would be possible to implement such a visualization using RTGraph? If so, could you point me to some relevant links regarding this?

Thank you for sharing this project.
Best regards,
Florian

TypeError: can't pickle weakref objects when running demo in Simulator mode

Hi! I tried to run your demo in Simulator mode, but this error occurred after start.
Here is the traceback:

Traceback (most recent call last):  
  File "D:\ProgramData\Anaconda3\lib\site-packages\rtgraph\ui\mainWindow.py", line 62, in start  
    if self.worker.start():  
  File "D:\ProgramData\Anaconda3\lib\site-packages\rtgraph\core\worker.py", line 80, in start  
    self._acquisition_process.start()  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\process.py", line 112, in start  
    self._popen = self._Popen(self)  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen  
    return _default_context.get_context().Process._Popen(process_obj)  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen  
    return Popen(process_obj)  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__  
    reduction.dump(process_obj, to_child)  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump  
    ForkingPickler(file, protocol).dump(obj)  
TypeError: can't pickle weakref objects  
Traceback (most recent call last):  
  File "<string>", line 1, in <module>  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main  
    exitcode = _main(fd)  
  File "D:\ProgramData\Anaconda3\lib\multiprocessing\spawn.py", line 115, in _main  
    self = reduction.pickle.load(from_parent)  
EOFError: Ran out of input

I found out that this error occurred because self._parser_process.start() is called before self._acquisition_process.start()

And here is my simulated program where the same error occurs:

from multiprocessing import Process,Event
import time
class TestProcess(Process):
    def __init__(self):
        Process.__init__(self)
        self._exit=Event()
    def stop(self):
        self._exit.set()
    def run(self):
        while not self._exit.is_set():
            pass
class TestProcessB(TestProcess):
    def __init__(self,p):
        Process.__init__(self)
        self._test_process=p
    def run(self):
        while not self._exit.is_set():
            print(time.time())
            time.sleep(1)
if __name__=='__main__':
    tp=TestProcess()
    tpb=TestProcessB(tp)
    tp.start()
    tpb.start()
    time.sleep(10)
    tp.stop()
    tpb.stop()

How can this problem be fixed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.