sigmf / sigmf-python

Easily interact with Signal Metadata Format (SigMF) recordings.
https://sigmf.org
GNU Lesser General Public License v3.0
44 stars 17 forks source link

Fix count samples from annotations #47

Closed vejretvejret closed 9 months ago

vejretvejret commented 9 months ago

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)
vejretvejret commented 9 months ago

Requested changes addressed