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

Question about DataReceiving and Sampling rate #335

Open
RanjitF opened this issue Aug 14, 2018 · 1 comment
Open

Question about DataReceiving and Sampling rate #335

RanjitF opened this issue Aug 14, 2018 · 1 comment

Comments

@RanjitF
Copy link

RanjitF commented Aug 14, 2018

I am curious about the DataReceiving function

while
[vec, ts]= inlet_data.pull_sample();
end

In my project, I want to store 3 second EEG data. Since the sampling frequency is fixed 5000 Hz, can I write the code like below to obtain accurate 3 second EEG data?

while count ~= 5000 * 3
[vec, ts]= inlet_data.pull_sample();
count = count + 1;
end

@tstenner
Copy link
Collaborator

tstenner commented Nov 2, 2018

In theory yes, you'd need to append the data to the vectors instead of overwriting them, but you should rather use pull_chunk. It's a lot faster and you can directly specify how many samples you want.

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