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

Implement a notify size for faster acquisition, enabling bulk acquisitions #31

Merged
merged 24 commits into from
Oct 3, 2023

Conversation

crnbaker
Copy link
Collaborator

@crnbaker crnbaker commented Jul 18, 2023

Previously, the "notify size" feature of the driver was not made use of: samples were only read from a transfer buffer after the transfer was complete. Now, samples are read once notification from the driver is received that "notify size" samples have been transferred, so that samples are read out of the transfer buffer while the acquisition is still going on.

This means that waveforms can now be acquired in bulk: get_waveforms has a new argument num_acquisitions which specifies the number of acquisitions that should be carried out before the samples are returns. This allows the user to carry out fast software averaging:

from numpy import array
...
num_averages = 4
average_waveforms = array(card.get_waveforms(num_averages)).mean(axis=0)

This branch also includes some more refactoring in preparation for supporting AWGs.

Fixes #30

@crnbaker crnbaker self-assigned this Jul 18, 2023
@crnbaker crnbaker force-pushed the 30_notify_size_no_awg branch from bc81904 to 1332836 Compare July 20, 2023 19:27
@crnbaker crnbaker merged commit a9c1d3a into main Oct 3, 2023
9 checks passed
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

Successfully merging this pull request may close these issues.

Software averaging
1 participant