Skip to content

DidierNe/persistence-spectrum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Persistence Spectrum

This program computes a persistence spectrum from a binary file of Fourier transforms.
It reads 2048-point FFT frames in dB and builds a histogram of occurrence over a given dB range.

Build

mkdir -p build
cd build
cmake ..
cmake --build . --config Release

Requires a C++17 compiler (Clang, GCC, or MSVC).

Run

./persistence <input_file.fft> <output_file.hist> [y_min] [y_max] [height]

Defaults: y_min = -130, y_max = -60, height = 2048

Example:

./persistence data/dmr.fft data/my_dmr.hist

Input / Output

  • Input: binary file of float32 values (each frame = 2048 values).
    The provided datasets are already in dB.
  • Output: binary file of uint32 values (height × 2048, row-major).
    • Row 0 → lowest dB (y_min)
    • Row height-1 → highest dB (y_max)

Notes

  • Values equal to y_max are included in the last bin.
  • Basic checks are performed on file size and arguments.
  • Default height (2048) matches the reference dmr.hist.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors