-
Notifications
You must be signed in to change notification settings - Fork 18
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
Signal extension usage #6
Comments
Hi @AdrFebles - the |
@jacobagilbert , |
@amulamoottil As far as I am aware, SigMF is fairly inflexible when it comes to adding additional meta information to your signals. The extensions module is pretty unwieldly and unintuitive to use. I have personally taken the habit of using the import json
extra_labels = {"SNR": 30, "Fading": "Rician"}
my_annotation['core:label'] = json.dumps(extra_labels) And for retrieving: for a in sig_handle.get_annotations():
extra_labels = json.loads(a['core:label']) # returns a dict However I believe there may be a character limit on this attribute, so pick one that works. Alternatively, you can sidestep with open("my_sigmf_file.sigmf-meta", "wt") as fin:
meta_data = json.load(fin)
meta_data['annotations'] That way you can add whatever labels you want (although obviously doesn't conform to Sigmf standards.) Hope this helps. |
Hi,
I'm using SigMFFile to store metadata in the correct format. However I need to define more field for signal details using the "signal extension". I haven't find any Python module to associate in SigMFFile.EXTENSION_KEY to the signal extension described on the SigMF repository. Are you planning to add this functionality in the SigMF Python package or do you have any idea about how can I add this info to the metadata?
Thanks in advance!
The text was updated successfully, but these errors were encountered: