firfilt/autotest: testing notch response (crcf)
@@ -74,6 +74,22 @@ void autotest_firfilt_crcf_rect()
firfilt_crcf_destroy(q);
}
+void autotest_firfilt_crcf_notch()
+{
+ // design filter and verify resulting spectrum
+ firfilt_crcf q = firfilt_crcf_create_notch(20, 60.0f, 0.125f);
+ autotest_psd_s regions[] = {
+ {.fmin=-0.5, .fmax=-0.20, .pmin=-0.1, .pmax=+0.1, .test_lo=1, .test_hi=1},
+ {.fmin=-0.126, .fmax=-0.124, .pmin= 0, .pmax= -50, .test_lo=0, .test_hi=1},
+ {.fmin=-0.06, .fmax=+0.06, .pmin=-0.1, .pmax=+0.1, .test_lo=1, .test_hi=1},
+ {.fmin=+0.124, .fmax=+0.126, .pmin= 0, .pmax= -50, .test_lo=0, .test_hi=1},
+ {.fmin= 0.20, .fmax=+0.5, .pmin=-0.1, .pmax=+0.1, .test_lo=1, .test_hi=1},
+ };
+ liquid_autotest_validate_psd_firfilt_crcf(q, 1200, regions, 5,
+ liquid_autotest_verbose ? "autotest_firfilt_crcf_notch.m" : NULL);
+ firfilt_crcf_destroy(q);
+}
+
void autotest_firfilt_config()
{
#if LIQUID_STRICT_EXIT
