Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add on/off plotting option in plotsignal (from Redis) #393

Open
stephenwhitmarsh opened this issue Apr 21, 2022 · 3 comments
Open

Add on/off plotting option in plotsignal (from Redis) #393

stephenwhitmarsh opened this issue Apr 21, 2022 · 3 comments

Comments

@stephenwhitmarsh
Copy link
Member

I made a patch that includes EEG and EMG processing and plotting. It was extremely slow with processing on control signals ~10 times slower than required (perhaps even more). I identified the problem to be the signal plotting. They themselves do not lag at all, indicating PyQT gets some kind of priority over other processes. Closing them sped up the whole pipeline tremendously, and back to what was expected/requested of the other modules.
Plotting is important, however, when evaluating the signal. If we add the option to pause/unpause plotting, e.g. via a Redis value received via midi or inputcontrol, we can have the best of both worlds and switch to plotting priority or process priority. To further improve efficiency, I would suggest to pause the reading of the data from the FT buffer then as well, not just the plotting.
The plotting of the control signals does not seem to require extra undue slowing, by the way, and would not require such option at this point.

@robertoostenveld
Copy link
Member

If we are going to en/disable plotting, I suggest to do it consistently in all plotting functions. And I propose to model it after the en/disabling of the saving of data to disk (with the recordxxx functions). Having a consistent implementation for en/disabling a module will facilitate documentation and avoid inconsistent implementations.

@stephenwhitmarsh
Copy link
Member Author

True, and historycontrol (if not already consistent)

robertoostenveld added a commit that referenced this issue Jul 3, 2022
- this adds the option `enable=1` to [general]
robertoostenveld added a commit that referenced this issue Jul 3, 2022
- this adds the option `enable=1` to [general]
@robertoostenveld
Copy link
Member

robertoostenveld commented Jul 3, 2022

We have some modules that already have an on/off option in one of the other sections in the ini file, but I think that the [general] section is the most appropriate for this.

I added the following option to a number of modules:

[general]
enable=1     ; this can be patched to Redis

and I have tested it with inputcontrol to switch plotting on/off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants