ASCII spectral periodogram for computing and displaying an estimate of a signal's power spectrum with ASCII characters
Public Functions
asgramf | asgramf_create( |
asgramf | asgramf_copy( |
int | asgramf_destroy( |
int | asgramf_reset( |
int | asgramf_set_scale( |
int | asgramf_set_display( |
int | asgramf_push( |
int | asgramf_write( |
int | asgramf_execute( |
int | asgramf_print( |
Interfaces
asgramf asgramf_create(
Create asgram object with size _nfft
- _nfft : size of FFT taken for each transform (character width)
asgramf asgramf_copy(
Copy object including all internal objects and state
int asgramf_destroy(
Destroy asgram object, freeing all internally-allocated memory
int asgramf_reset(
Reset the internal state of the asgram object
int asgramf_set_scale(
Set the scale and offset for spectrogram in terms of dB for display purposes
- _q : asgram object
- _ref : signal reference level [dB]
- _div : signal division [dB]
int asgramf_set_display(
Set the display's 10 characters for output string starting from the weakest and ending with the strongest
- _q : asgram object
- _ascii : 10-character display, default: " .,-+*&NM#"
int asgramf_push(
Push a single sample into the asgram object, executing internal transform as necessary.
- _q : asgram object
- _x : input sample
int asgramf_write(
Write a block of samples to the asgram object, executing internal transforms as necessary.
- _q : asgram object
- _x : input buffer, shape: (_n, 1)
- _n : input buffer length
int asgramf_execute(
Compute spectral periodogram output from current buffer contents and return the ascii character string to display along with the peak value and its frequency location
- _q : asgram object
- _ascii : output ASCII string, shape: (_nfft, 1)
- _peakval : peak power spectral density value [dB]
- _peakfreq : peak power spectral density frequency
int asgramf_print(
Compute spectral periodogram output from current buffer contents and print standard format to stdout