Skip to content

Commit

Permalink
autotest/psd: adding method to valid psd based on spgramcf object
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaeddert committed Apr 16, 2024
1 parent baa8ac3 commit 6fd6741
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions autotest/autotest.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,16 @@ int liquid_autotest_validate_psd_iirfilt_rrrf(iirfilt_rrrf _q, unsigned int _nff
return liquid_autotest_validate_spectrum(psd,_nfft,_regions,num_regions,debug_filename);
}

// validate spectral content of a spectral periodogram object
int liquid_autotest_validate_psd_spgramcf(spgramcf _q,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename)
{
unsigned int nfft = spgramcf_get_nfft(_q);
float psd[nfft];
spgramcf_get_psd(_q, psd);
return liquid_autotest_validate_spectrum(psd,nfft,_regions,num_regions,debug_filename);
}

// callback function to simplify testing for framing objects
int framing_autotest_callback(
unsigned char * _header,
Expand Down
4 changes: 4 additions & 0 deletions autotest/autotest.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ int liquid_autotest_validate_psd_firfilt_cccf(firfilt_cccf _q, unsigned int _nff
int liquid_autotest_validate_psd_iirfilt_rrrf(iirfilt_rrrf _q, unsigned int _nfft,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename);

// validate spectral content of a spectral periodogram object
int liquid_autotest_validate_psd_spgramcf(spgramcf _q,
autotest_psd_s * _regions, unsigned int num_regions, const char * debug_filename);

// callback function to simplify testing for framing objects
#define FRAMING_AUTOTEST_SECRET 0x01234567
int framing_autotest_callback(
Expand Down

0 comments on commit 6fd6741

Please sign in to comment.