Skip to content

Collection example is confusing #63

@daniestevez

Description

@daniestevez

I was looking at the example about how to create a collection in the README and was confused by the following lines:

streams = collection.get_stream_names()
sigmf = [collection.get_SigMFFile(stream) for stream in streams]

The second line overwrites the sigmf identifier (which is how the Python module has been imported), which is not a great idea. This variable sigmf and also streams are not used later on, so it's not too clear why they are created. Given that the next example is how to load a SigMF collection, probably the collection.get_stream_names() call could be moved there to show how it's possible to list the files in the collection. Maybe even something like:

all_sigmffiles = [collection.get_SigMFFile(stream_name=stream_name)
                             for stream_name in collection.get_stream_names()]

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions