vlfrx
Python library for VLF (Very Low Frequency) radio signal processing.
This library can be used both as a CLI tool and as a Python library for other projects.
Install
pip install vlfrx
Usage (as Python Library)
from vlfrx import open_input, open_output, Timestamp
import numpy as np
from vlfrx.services.signal_gen import generate_sine
from vlfrx.services.spectrum import compute_fft
from vlfrx.services.filter import design_fir_filter, apply_filter
# Read a VT file
vt = open_input("signal.vt")
frame = vt.read_frame()
print(f"Timestamp: {vt.get_timestamp()}")
print(f"Channels: {vt.channels}, Sample rate: {vt.sample_rate} Hz")
vt.close()
# Write a VT file
signal = generate_sine(1000, 1.0, fs=48000)
vt = open_output("output.vt", channels=1, sample_rate=48000)
vt.write_frames(signal.reshape(-1, 1))
vt.close()
# Compute spectrum
vt = open_input("signal.vt")
frames = []
while True:
frame = vt.read_frame()
if frame is None:
break
frames.append(frame)
data = np.array(frames)
freqs, psd = compute_fft(data[:, 0], fs=vt.sample_rate)
# Apply filter
b = design_fir_filter('lowpass', 1000, fs=48000)
filtered, _ = apply_filter(data[:, 0], b)
Public API
# Core
from vlfrx import (
Timestamp, # High-precision timestamp
VTFile, # VT file reader/writer
VTBlock, # Data block structure
ChannelSpec, # Channel specification
open_input, # Open VT file for reading
open_output, # Open VT file for writing
parse_chanspec,
)
# Services
from vlfrx.services.spectrum import (
compute_fft,
compute_power_spectrum,
compute_spectrogram,
compute_rolling_spectrogram,
phase_spectrum,
)
from vlfrx.services.filter import (
design_fir_filter,
design_iir_filter,
apply_filter,
apply_fir_filter,
apply_iir_filter,
design_bandpass,
design_notch,
)
from vlfrx.services.signal_gen import (
generate_sine,
generate_square,
generate_sawtooth,
generate_white_noise,
generate_pink_noise,
generate_chirp,
generate_am,
generate_fm,
)
CLI
# Read and display VT file
vlfrx read input.vt
# Show file info
vlfrx info input.vt
# Compute spectrum
vlfrx spec input.vt -o spectrum.txt
# Generate a sine wave
vlfrx gen 1000 1.0 -o signal.vt
# Concatenate files
vlfrx cat file1.vt file2.vt -o combined.vt
# Apply filter
vlfrx filter input.vt -o output.vt -t lowpass -c 1000
Development
git clone https://github.com/daedalus/vlfrx-tools-py.git
cd vlfrx-tools-py
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
License
MIT License - Copyright (c) 2026 Darío Clavijo
Metadata
Release files for vlfrx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vlfrx-0.1.0.tar.gz | 19.2 kB | With provenance | Details for vlfrx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vlfrx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vlfrx-0.1.0-py3-none-any.whl |
Total release size: 43.0 kB
Release files / vlfrx-0.1.0.tar.gz
| Download URL | vlfrx-0.1.0.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34e58cf4534c3aca0c20cd4d82cf0529d9e56fedd2a1a41b76e61f19af643e6a
|
|
BLAKE2b-256 checksum How to use checksums |
d6ae535a360fa1cf3396f2f1e1afc07ec7354d6cb06091c933fce894bfcbe7d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logRelease files / vlfrx-0.1.0-py3-none-any.whl
| Download URL | vlfrx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0cb2012c0c00162ee897f2194536ae940be0d0f23857bc4e55615b20e305760a
|
|
BLAKE2b-256 checksum How to use checksums |
837faf54358d0b9eb74bae2f90f5ce56fddca69915d749df18cd7a2007b07bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logSecurity for vlfrx 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vlfrx-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.