Releases: sigmf/sigmf-python
v1.6.1 Bluefile Converter
Bluefile Converter
In this release we are excited to announce the addition of a converter for the MIDAS Blue and Platinum BLUE RF recording formats (commonly .cdif files). This allows you to seamlessly integrate BLUE file recordings into your SigMF workflows.
The converter automatically detects BLUE file formats and can create standard SigMF file pairs, archives, or Non-Conforming Datasets (NCDs) that reference the original recording. Original BLUE header information is preserved in the SigMF metadata under the blue: namespace.
Python API Example
You can use the converter directly within your Python scripts. If no output path is provided, a metadata-only SigMFFile object for a Non-Conforming Dataset (NCD) is returned without writing any files.
from sigmf.convert.blue import blue_to_sigmf
# Convert a BLUE file to a standard SigMF file pair
meta = blue_to_sigmf(blue_path="recording.cdif", out_path="recording")
# Create an NCD object in memory (no files written)
meta = blue_to_sigmf(blue_path="recording.cdif")
# Access samples and metadata
all_samples = meta.read_samples()
sample_rate = meta.sample_rate
# Original bluefile metadata preserved (in `fixed`, `adjunct`, and `extended` keys)
meta.get_global_field('blue:adjunct'){'xstart': 0.025, 'xdelta': 5.5555555555555555e-08, 'xunits': 1}Command-Line Example
The converter is also integrated into the unified sigmf_convert command-line tool, which automatically detects the input file format.
# Convert a .cdif file to a SigMF archive
sigmf_convert recording.cdif recording.sigmf --archive
# Create a non-conforming dataset (metadata only, references original data)
sigmf_convert recording.cdif recording --ncdWhat's Changed
- Feature: Blue Support by @Teque5 and @KelseyCreekSoftware in #122
- Expand support to python 3.14 (π) by @Teque5 in #127
Thanks
Special thanks for the initial BLUE converter implementation and testing by @KelseyCreekSoftware.
Full Changelog: v1.5.1...v1.6.1
v1.5.1 Archive Upgrades
Sample access
Regardless of the source format (SigMF Pair / Archive / Non-Conforming Dataset) remember you can access samples by:
import sigmf
meta = sigmf.fromfile("example.sigmf")
# access by slicing
samples = meta[0:10]
# access by single file read
samples = meta.read_samples(count=10)
# access all samples from some capture index
samples = meta.read_samples_in_capture(2)
# by default all samples returned will be within [-1, +1] regardless of underlying formatWhat's Changed
- fix capture byte boundaries for archives by @Teque5 in #124
- bug: slicing for complex fixed-point data by @Teque5 in #126
Full Changelog: v1.4.0...v1.5.1
v1.4.0 Unified Sample Access
New ways to use SigMF
When accessing samples from sigmf files samples returning from a direct read and a slice always yield the same result:
import sigmf
meta = sigmf.fromfile('some_archive.sigmf')
# equivalent methods
meta[:] == meta.read_samples()
meta[0:1024] == meta.read_samples(count=1024)
meta[3:13] == meta.read_samples(start_index=3, count=10)Integer datatypes are now always scaled such that the min/max is -1/1. If raw values are desired then set autoscale=False when doing fromfile():
meta = sigmf.fromfile('some_archive.sigmf', autoscale=False)
# still equivalent:
meta[0:10] == meta.read_samples(count=10)What's Changed
Full Changelog: v1.3.0...v1.4.0
v1.3.0 Attributes
New ways to use SigMF
When properties are part of sigmf global fields, they can now be read and written via attributes:
import sigmf
meta = sigmf.fromfile("some.sigmf-data")
sample_rate = meta.sample_rate # reads from metadata["global"]["core::sample_rate"]
num_channels = meta.num_channels # reads from metadata["global"]["core::num_channels"]
meta.author = "Bruce Wayne" # writes to metadata["global"]["core::author"]What's Changed
- Feature: Properties for global fields by @Teque5 in #116
- Add basic I/O test for sigmf_convert_wav (fixes #50) by @aic1994 in #123
- fix read_samples from SigMF archive by @Teque5 in #119
- Feature/spec update to v1.2.6 by @Teque5 in #120
- 117 remove assertions by @gregparkes in #118
New Contributors
Full Changelog: v1.2.12...v1.3.0
v1.2.12 Polish
Module Polish
# you can now load a sigmf archive or file just by doing
import sigmf
sigmf.fromfile('some.sigmf')Also, a warning will now be created if your metadata uses an undeclared extension. Remember extensions should be listed in core:extensions like:
"global": {
...
"core:extensions" : [
{
"name": "extension-01",
"version": "0.0.5",
"optional": true
},
{
"name": "extension-02",
"version": "1.2.3",
"optional": false
}
]
...
}What's Changed
- feat: validate undeclared SigMF extensions in metadata by @Arjunmehta312 in #104
- fromfile & fromarchive by @Teque5 in #114
New Contributors
- @Arjunmehta312 made their first contribution in #104
Full Changelog: v1.2.10...v1.2.12
v1.2.10
v1.2.9 Path Hotfix
What's Changed
- Take filenames with dots into account in get_sigmf_filenames() by @daniestevez in #107
New Contributors
- @daniestevez made their first contribution in #107
Full Changelog: v1.2.8...v1.2.9
v1.2.8 Docs & Pathlib Everywhere
Highlights
- Documentation now autobuilds on merge and uploads to sigmf.readthedocs.io.
- All path handling now done by pathlib.
What's Changed
- feature/readthedocs by @Teque5 in #97
- cross-platform worker estimation by @Teque5 in #101
- os.path converted pathlib.Path by @ademhilmibozkurt in #94
- remove explicit use of /tmp & address pylint issues by @Teque5 in #105
New Contributors
- @ademhilmibozkurt made their first contribution in #94
Full Changelog: v1.2.6...v1.2.8
v1.2.6 NCD & Collections
Highlights
- Support for non-conforming datasets (where the data file is not a
.sigmf-data) - Improvements for
.sigmf-collection - Add equality checking for
SigMFFile
What's Changed
- remove unnecessary inline comprehension by @Teque5 in #75
- override global info instead of replace on init by @Teque5 in #77
- Fix path handling for non-conforming datasets by @GreenK173 in #81
- Add specification version to the metadata in SigMFCollection by @GreenK173 in #83
- datetime parsing for python 3.7 thru 3.12; fix deprecation warning by @Teque5 in #93
- Add directory of the collection to SigMFCollection by @GreenK173 in #85
- Fix coding style and PEP8 violations by @GreenK173 in #86
- Add eq method to SigMFFile by @Teque5 in #98 (thanks to @jhazentia)
New Contributors
- @GreenK173 made their first contribution in #81
Full Changelog: v1.2.3...v1.2.6
v1.2.3 Validator
Release coincident with start of GNU Radio Conference 2024. Perhaps another patch coming later this week after the SigMF workshop.
What's Changed Since v1.2.1
What's new?
- Better SigMF archive handling & bugfixes.
- Improved multi-threaded
sigmf_validate.
Other Improvements
- Allow globstar (
*) insigmf_validateby @gregparkes in #59 - always set metadata version to current implemented specification by @Teque5 in #67
- add test for bad checksum by @Teque5 in #68
- improve github action by @Teque5 in #73
Removed Bits
- delete concept of default metadata and clarify validation err by @Teque5 in #69
- remove
sigmf_guidue to lack of support and PySimpleGUI changes by @Teque5 in #66
Full Changelog: v1.2.1...v1.2.3