Skip to content

sigmffile.read_samples() ignores raw_components parameter #15

@margamc

Description

@margamc

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions