Closed fchirono closed 9 months ago
Suggestion for test/validation: compare Fluctuation Strength calculation with modeled curves for synthetic sounds (amplitude- and frequency-modulated pure tones). Sottek et al [1] has analytical expressions for:
[1] R. Sottek et al, "Perception of Fluctuating Sounds", DAGA 2021 - https://pub.dega-akustik.de/DAGA_2021/data/articles/000087.pdf
The equations from Sottek et al (DAGA 2021) describing the perceived Fluctuation Strength to synthetic, stationary AM/FM sounds are now implemented in tests/sq_metrics/fluctuation_strength/test_fluctuation_strength.py
. These could be used to validate the Fluctuation Strength function, such as checking for max. 20% deviation from these metrics.
Added unit tests for Fluctuation Strength implementation: they generate the required test signals to compare with the Figures 1, 2, 3a, 3b, 5 and 6 in Sottek et al (DAGA 2021), and assert that all FS values are within 20% of the expressions given in the same paper.
At the moment, the dummy implementation of fluctuation_strength.py
always returns 1
, so all tests will always fail.
Batch of unit tests created successfully, in test_fluctuation_strength.py
. The auxiliary variable force_pass
inside this function lets the test progress and creates the figures even when the actual test calculation fails, which helps to see the results and run all the tests.
More tests can be added in the future, but this is probably good enough for now.
Current assumptions in the code that need confirmation: