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

sigmffile.read_samples() ignores raw_components parameter #15

Open
margamc opened this issue May 17, 2023 · 0 comments
Open

sigmffile.read_samples() ignores raw_components parameter #15

margamc opened this issue May 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@margamc
Copy link

margamc commented May 17, 2023

Hi, I have detected what I think is a bug. When you do:

import sigmf
sigfile = sigmf.sigmffile.fromfile("some_sigmf_file")
samples_raw = sigfile.read_samples(raw_components=True)
samples = sigfile.read_samples()

The samples_raw and samples variables are identical.

I have noticed that the raw_components parameter is not really used as argument for the internal _read_datafile() function in sigmffile.py. Instead, there is a static False when the function is called in line 605.

I have resolved this bug for my project by changing line 605 of sigmffile.py from:

return self._read_datafile(first_byte, count * self.get_num_channels(), autoscale, False)

to:

return self._read_datafile(first_byte, count * self.get_num_channels(), autoscale, raw_components)

But I don't know if this change has side effects. Please, could you check it and if it's ok solve the issue for the next release?

Thank you!

@Teque5 Teque5 added the bug Something isn't working label May 17, 2023
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

No branches or pull requests

2 participants