Hello,
I’m working on a data acquisition program in Python that needs to stream/save waveform data at 4 GB/s. I plot a small subset of the data and control the hardware from a GUI.
The computational load is significant for the system, and I can’t afford to lose any data points. For this reason, I have to interface with the data acquisition hardware from a process separate from the GUI. Until now, I’ve been running a process from the multiprocessing module.
The problem with this approach is that I can only run a single function with a multiprocessing.Process instance. This means that I have to re-initialize the hardware, RAM buffers, etc. every time an acquisition setting is changed in the GUI. I’d like to initialize the hardware as a class instance instead, but it has to be in an entirely separate process. This would allow me to pause the acquisition, change some settings, then resume without all the other steps.
Is there a good way to do this in Python? I know I can subclass the multiprocessing.Process class, but I still end up with a function loop in the run() method.
submitted by /u/yrfgua
[link] [comments]
r/learnpython Hello, I’m working on a data acquisition program in Python that needs to stream/save waveform data at 4 GB/s. I plot a small subset of the data and control the hardware from a GUI. The computational load is significant for the system, and I can’t afford to lose any data points. For this reason, I have to interface with the data acquisition hardware from a process separate from the GUI. Until now, I’ve been running a process from the multiprocessing module. The problem with this approach is that I can only run a single function with a multiprocessing.Process instance. This means that I have to re-initialize the hardware, RAM buffers, etc. every time an acquisition setting is changed in the GUI. I’d like to initialize the hardware as a class instance instead, but it has to be in an entirely separate process. This would allow me to pause the acquisition, change some settings, then resume without all the other steps. Is there a good way to do this in Python? I know I can subclass the multiprocessing.Process class, but I still end up with a function loop in the run() method. submitted by /u/yrfgua [link] [comments]
Hello,
I’m working on a data acquisition program in Python that needs to stream/save waveform data at 4 GB/s. I plot a small subset of the data and control the hardware from a GUI.
The computational load is significant for the system, and I can’t afford to lose any data points. For this reason, I have to interface with the data acquisition hardware from a process separate from the GUI. Until now, I’ve been running a process from the multiprocessing module.
The problem with this approach is that I can only run a single function with a multiprocessing.Process instance. This means that I have to re-initialize the hardware, RAM buffers, etc. every time an acquisition setting is changed in the GUI. I’d like to initialize the hardware as a class instance instead, but it has to be in an entirely separate process. This would allow me to pause the acquisition, change some settings, then resume without all the other steps.
Is there a good way to do this in Python? I know I can subclass the multiprocessing.Process class, but I still end up with a function loop in the run() method.
submitted by /u/yrfgua
[link] [comments]