spwaterfallf

Variants: spwaterfallcf, spwaterfallf

Spectral periodogram waterfall object for computing time-varying power spectral density estimates

Public Functions

spwaterfallf spwaterfallf_create(unsigned int _nfft, int _wtype, unsigned int _window_len, unsigned int _delay, unsigned int _time)
spwaterfallf spwaterfallf_create_default(unsigned int _nfft, unsigned int _time)
spwaterfallf spwaterfallf_copy(spwaterfallf _q)
int spwaterfallf_destroy(spwaterfallf _q)
int spwaterfallf_clear(spwaterfallf _q)
int spwaterfallf_reset(spwaterfallf _q)
int spwaterfallf_print(spwaterfallf _q)
uint64_t spwaterfallf_get_num_samples_total(spwaterfallf _q)
unsigned int spwaterfallf_get_num_freq(spwaterfallf _q)
unsigned int spwaterfallf_get_num_time(spwaterfallf _q)
unsigned int spwaterfallf_get_window_len(spwaterfallf _q)
unsigned int spwaterfallf_get_delay(spwaterfallf _q)
int spwaterfallf_get_wtype(spwaterfallf _q)
const float * spwaterfallf_get_psd(spwaterfallf _q)
int spwaterfallf_set_freq(spwaterfallf _q, float _freq)
int spwaterfallf_set_rate(spwaterfallf _q, float _rate)
int spwaterfallf_set_dims(spwaterfallf _q, unsigned int _width, unsigned int _height)
int spwaterfallf_set_commands(spwaterfallf _q, const char * _commands)
int spwaterfallf_push(spwaterfallf _q, float _x)
int spwaterfallf_write(spwaterfallf _q, float * _x, unsigned int _n)
int spwaterfallf_export(spwaterfallf _q, const char * _base)

Interfaces

spwaterfallf spwaterfallf_create(unsigned int _nfft, int _wtype, unsigned int _window_len, unsigned int _delay, unsigned int _time)

Create spwaterfall object, fully defined

  • _nfft : transform (FFT) size, 2 <= _nfft
  • _wtype : window type, e.g. LIQUID_WINDOW_HAMMING
  • _window_len : window length, 1 <= _window_len <= _nfft
  • _delay : delay between transforms, 0 < _delay
  • _time : number of aggregated transforms, 0 < _time

spwaterfallf spwaterfallf_create_default(unsigned int _nfft, unsigned int _time)

Create default spwatefall object (Kaiser-Bessel window)

  • _nfft : transform size, 2 <= _nfft
  • _time : delay between transforms, _delay > 0

spwaterfallf spwaterfallf_copy(spwaterfallf _q)

Copy object including all internal objects and state

int spwaterfallf_destroy(spwaterfallf _q)

Destroy spwaterfall object, freeing all internally-allocated memory

int spwaterfallf_clear(spwaterfallf _q)

Clears the internal state of the object, but not the internal buffer

int spwaterfallf_reset(spwaterfallf _q)

Reset the object to its original state completely. This effectively executes the clear() method and then resets the internal buffer

int spwaterfallf_print(spwaterfallf _q)

Print internal state of the object to stdout

uint64_t spwaterfallf_get_num_samples_total(spwaterfallf _q)

Get number of samples processed since object was created

unsigned int spwaterfallf_get_num_freq(spwaterfallf _q)

Get FFT size (columns in PSD output)

unsigned int spwaterfallf_get_num_time(spwaterfallf _q)

Get number of accumulated FFTs (rows in PSD output)

unsigned int spwaterfallf_get_window_len(spwaterfallf _q)

Get window length used in spectral estimation

unsigned int spwaterfallf_get_delay(spwaterfallf _q)

Get delay between transforms used in spectral estimation

int spwaterfallf_get_wtype(spwaterfallf _q)

Get window type used in spectral estimation

const float * spwaterfallf_get_psd(spwaterfallf _q)

Get power spectral density (PSD), size: nfft x time

int spwaterfallf_set_freq(spwaterfallf _q, float _freq)

Set the center frequency of the received signal. This is for display purposes only when generating the output image.

  • _q : spectral periodogram waterfall object
  • _freq : center frequency [Hz]

int spwaterfallf_set_rate(spwaterfallf _q, float _rate)

Set the sample rate (frequency) of the received signal. This is for display purposes only when generating the output image.

  • _q : spectral periodogram waterfall object
  • _rate : sample rate [Hz]

int spwaterfallf_set_dims(spwaterfallf _q, unsigned int _width, unsigned int _height)

Set the canvas size. This is for display purposes only when generating the output image.

  • _q : spectral periodogram waterfall object
  • _width : image width [pixels]
  • _height : image height [pixels]

int spwaterfallf_set_commands(spwaterfallf _q, const char * _commands)

Set commands for executing directly before 'plot' statement.

  • _q : spectral periodogram waterfall object
  • _commands : gnuplot commands separated by semicolons

int spwaterfallf_push(spwaterfallf _q, float _x)

Push a single sample into the object, executing internal transform as necessary.

  • _q : spwaterfall object
  • _x : input sample

int spwaterfallf_write(spwaterfallf _q, float * _x, unsigned int _n)

Write a block of samples to the object, executing internal transform as necessary.

  • _q : spwaterfall object
  • _x : input buffer, shape: (_n, 1)
  • _n : input buffer length

int spwaterfallf_export(spwaterfallf _q, const char * _base)

Export set of files for plotting

  • _q : spwaterfall object
  • _base : base filename (will export .gnu, .bin, and .png files)