Skip to content

Releases: sigmf/sigmf-python

v1.11.1 Simple fromarray()

30 May 17:51
b98e700

Choose a tag to compare

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

29 May 23:18
3d08295

Choose a tag to compare

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

Full Changelog: v1.10.0...v1.11.0

v1.10.0 compression & fromarray

01 May 18:32
eb19378

Choose a tag to compare

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 archive

What's Changed

  • Compression Support & New sigmf.fromarray method by @Teque5 in #146

Full Changelog: v1.9.1...v1.10.0

Signal Generator

25 Apr 01:31
00202ba

Choose a tag to compare

What's Changed

Full Changelog: v1.8.0...v1.9.0

SignalHound Support

12 Apr 17:01
8658978

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.7.2...v1.8.0

v1.7.2 NCD Bugfix

20 Mar 20:50
241ed97

Choose a tag to compare

What's Changed

  • Reorder priority for conflicting datasets by @cguo02 in #142

New Contributors

Full Changelog: v1.7.1...v1.7.2

v1.7.1 Capure Merge Bugfix

17 Mar 17:43
2b0621b

Choose a tag to compare

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

30 Jan 15:58
c06863d

Choose a tag to compare

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

Full Changelog: v1.6.1...v1.7.0

v1.6.1 Bluefile Converter

20 Jan 16:59
615d544

Choose a tag to compare

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 --ncd

What's Changed

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

13 Jan 22:31
ac7669c

Choose a tag to compare

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 format

What'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