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

Fix count samples from annotations #47

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Fix count samples from annotations #47

merged 2 commits into from
Jan 19, 2024

Conversation

vejretvejret
Copy link
Contributor

Fixed two scenarios where SigMFFile._count_samples() failed:

  1. No data_file registered: sample_count should be calculated from annotation with highest end index, not from annotation with highest start index
  2. If no core:sample_count is provided in the annotation, core:sample_start should be used (sample count must at least be equal to this)

Copy link
Collaborator

@Teque5 Teque5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the bug, just a few alterations and this is good.

tests/testdata.py Outdated Show resolved Hide resolved
sigmf/sigmffile.py Outdated Show resolved Hide resolved
tests/test_sigmffile.py Outdated Show resolved Hide resolved
tests/test_sigmffile.py Show resolved Hide resolved
@Teque5 Teque5 self-assigned this Jan 18, 2024
@Teque5 Teque5 added the bug Something isn't working label Jan 18, 2024
@vejretvejret
Copy link
Contributor Author

Requested changes addressed

Copy link
Collaborator

@Teque5 Teque5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@Teque5 Teque5 merged commit 1386965 into sigmf:main Jan 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants