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

More documentation for "sample frequency" #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

It turns out "sample frequency" is actually the number of samples per channel/signal in EDFlib:
https://www.teuniz.net/edflib/doc/edflib_8h.html#a11d03849cecc17a2599125a1a102b69e

We inherit this strange definition, and need to explain it.

Fixes #199.

It turns out "sample frequency" is actually the number of samples per
channel/signal in EDFlib:
https://www.teuniz.net/edflib/doc/edflib_8h.html#a11d03849cecc17a2599125a1a102b69e

We inherit this strange definition, and need to explain it.
@skjerns
Copy link
Collaborator

skjerns commented Nov 8, 2023

I see. This is all a big mess.

I would still favour to express sampling_frequency in Hz (samples/second) and not in samples/block_size and therefore deviate from the definition in edflib.
I don't think anybody thinks in terms of samples/block_size, as the block_size is irrelevant outside of the technicial file definitions of the EDF file.

Somehow, pyedflib originally decided to use sample_rate instead of sample_frequency, but kept the strange definition of sample_frequency from edflib as samples/duration. My idea to introduce sample_frequency was to keep backwards compatibility with previous code that might use sample_rate and set a specific record_duration. This most likely just complicated things 😅

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.

sampling rate is not accurate when data record duration is not 1 second
2 participants