Releases: sigmf/sigmf-python
v1.11.1 Simple fromarray()
sigmf.fromarray() to make using sigmf easier...
import numpy as np
import sigmf
data = np.array([0.1 + 0.2j, 0.3 + 0.4j], dtype=np.complex64)
meta = sigmf.fromarray(data)
# optional additional metadata
meta.sample_rate = 8000
meta.description = "sample recording"
meta.add_capture(start_index=0, metadata={sigmf.FREQUENCY_KEY: 915e6})
# creates recording.sigmf-data and recording.sigmf-meta
meta.tofile("recording")
# or create compressed archive
meta.tofile("recording.sigmf.gz")What's Changed
Full Changelog: v1.11.0...v1.11.1
v1.11.0 Key Simplification
SigMF keys previously accessed like SigMFFile.SAMPLE_START_KEY will now raise a deprecation warning. The same keys can now be accessed simply via sigmf.SAMPLE_START_KEY.
What's Changed
- include instructions for conda/mamba by @Teque5 in #152
- Feature/key simplification by @Teque5 in #150
Full Changelog: v1.10.0...v1.11.0
v1.10.0 compression & fromarray
The sigmf.fromarray() convenience function mirrors sigmf.fromfile(). It infers the SigMF datatype from the numpy dtype. This can then be used with existing tofile() method, which now also supports compressed archives for reading & writing:
data = np.array([<SOME_STUFF>], dtype=<SOME_DTYPE>)
meta = sigmf.fromarray(data, sample_rate=48000)
meta.tofile("x") # create `x.sigmf-data` and `x.sigmf-meta` pair
meta.tofile("x.sigmf.gz") # create `x.sigmf.gz` compressed archiveWhat's Changed
Full Changelog: v1.9.1...v1.10.0
Signal Generator
SignalHound Support
What's Changed
- Signal Hound Converter by @KelseyCreekSoftware in #136
New Contributors
- @KelseyCreekSoftware made their first contribution in #136
Full Changelog: v1.7.2...v1.8.0
v1.7.2 NCD Bugfix
v1.7.1 Capure Merge Bugfix
Small bugfix for adding captures from same sample index wouldn't merge the capture metadata.
Full Changelog: v1.7.0...v1.7.1
v1.7.0 Safe Overwrite
Overwrite Behavior
Now when writing a sigmf that already exists, overwrite=True must be specified.
Or when using a converter, the --overwrite flag must be enabled to overwrite an existing file.
In either case it will raise a SigMFFileExists error if those conditions aren't met.
What's Changed
- fix table syntax err by @Teque5 in #128
- support for BLUE uint16 & uint32, with testing by @Teque5 in #129
- Feature/overwrite behavior by @Teque5 in #134
Full Changelog: v1.6.1...v1.7.0
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