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()]
I was looking at the example about how to create a collection in the README and was confused by the following lines:
The second line overwrites the
sigmf
identifier (which is how the Python module has been imported), which is not a great idea. This variablesigmf
and alsostreams
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 thecollection.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: