Skip to main content

Easily interact with Signal Metadata Format (SigMF) recordings.

Project description

Rendered SigMF Logo

PyPI Version Shield Build Status Shield License Shield Documentation Shield PyPI Downloads Shield

The sigmf library makes it easy to interact with Signal Metadata Format (SigMF) recordings. This library is compatible with Python 3.7-3.14 and is distributed freely under the terms GNU Lesser GPL v3 License.

This module follows the SigMF specification html/pdf from the spec repository.

Install

pip install sigmf
# or
conda install sigmf
# or
mamba install sigmf

Read SigMF

import sigmf

# read SigMF recording
meta = sigmf.fromfile("recording.sigmf-meta")
samples = meta[0:1024]  # get first 1024 samples
sample_rate = meta.sample_rate  # get sample rate

# read compressed SigMF archives
meta = sigmf.fromfile("recording.sigmf.gz")   # gzip-compressed
meta = sigmf.fromfile("recording.sigmf.xz")   # xz-compressed
meta = sigmf.fromfile("recording.sigmf.zip")  # zip archive

# read other formats containing RF time series as SigMF
meta = sigmf.fromfile("recording.wav")   # WAV
meta = sigmf.fromfile("recording.cdif")  # BLUE / Platinum
meta = sigmf.fromfile("recording.xml")   # Signal Hound Spike

Write SigMF

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")

Docs

Please visit our documentation for full API reference and more info.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigmf-1.11.1.tar.gz (92.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sigmf-1.11.1-py3-none-any.whl (66.7 kB view details)

Uploaded Python 3

File details

Details for the file sigmf-1.11.1.tar.gz.

File metadata

  • Download URL: sigmf-1.11.1.tar.gz
  • Upload date:
  • Size: 92.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for sigmf-1.11.1.tar.gz
Algorithm Hash digest
SHA256 2d5745f200631f3abfb93a5baccc799f87e57bad901a624abf4468fc3a11ec16
MD5 4fb33b2fb2cc494595408053ab37de85
BLAKE2b-256 123294a9e4f258c764942c70c419219dcd5cdd4b8123d100c5f5c4a13aa476b8

See more details on using hashes here.

File details

Details for the file sigmf-1.11.1-py3-none-any.whl.

File metadata

  • Download URL: sigmf-1.11.1-py3-none-any.whl
  • Upload date:
  • Size: 66.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for sigmf-1.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c8a94ebe95e702f44d4d3c50fa400c92cccbd72974309e18713d5a176548dc3
MD5 e95e1d39dd0066d320d582fc0a9c95ca
BLAKE2b-256 6a86889856dc4d10ea324b01d88a12a578937bf7c2c30f1def390b3e9da6fcf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page