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

Sample rates question #7

Open
davepruitt opened this issue Jan 17, 2025 · 0 comments
Open

Sample rates question #7

davepruitt opened this issue Jan 17, 2025 · 0 comments

Comments

@davepruitt
Copy link

I'm not sure what the best place to ask this, or who the best person to ask is. I am posting this here because my question is specific to the ZMQ Interface plug-in within Open Ephys, so this seems like the best place.

Anyway, here is my question:

I am currently writing a Python app that is going to control some of our experiments. The Python app is streaming some EMG data from OpenEphys using the ZMQ Interface plug-in. As of right now the application itself is still very simple, so there's not a lot going on - it's literally just streaming data and plotting it.

Within the OpenEphys GUI, my "signal chain" is quite simple. I am not even streaming data from a real device. I am just using the example data that is provided with the application. So, I open the example data data, and then I send the data over to my Python application via the ZMQ Interface plug-in. Here is the signal chain:

Image

The example data claims it is sampled at 40 kHz. Thus, I would expect that my Python application would receive 40,000 samples per second. However, this is not the case. Typically, I seem to be received 2 messages via the ZMQ Interface per second, and each message contains 853 samples, so a total of 1706 samples per second.

Importantly, I am only reading from Channel 1 on the Python side. Actually, my code is pretty much taken directly from the example Python code on this repository. In fact, if I just run the actual example application on this repository it seems to also be streaming data at that same rate - 1706 samples per second.

So... I'm trying to understand what is going on here? Is there some configuration that I need to do so that the number of samples that I receive per second matches the actual sample rate of the data?

If I can't match the sample rate of the data, then how do I know which samples I am receiving via the ZMQ Interface? For all I know it could be sending me a batch of samples that are not "live" because it's not "keeping up" with the "live" data.

Any help would be appreciated. Thank you!

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

1 participant