HaroldMills / Vesper

Open source software for acoustic monitoring of nocturnal bird migration.
MIT License
55 stars 6 forks source link

Add unit tests for time-frequency analysis utilities. #75

Open HaroldMills opened 8 years ago

HaroldMills commented 8 years ago

The time_frequency_analysis_utils module currently has no unit tests, but of course it should. I found a bug recently that affected three functions in this module. The bug almost certainly would have been evident in unit tests.

HaroldMills commented 7 years ago

This issue is partially addressed by 3408d393eb5294dcdb3f7bababdfcb0b23f138e6. However, unit tests for spectrograms with nonrectangular windows and window sizes that differ from the DFT size are still needed.

HaroldMills commented 7 years ago

I think it would be a good idea to create a standard set of unit test cases for DFT and spectrogram computations and use them to test both our Python and JavaScript spectrum analysis code. The test cases could be generated by Python code and written to a JSON file for use with JavaScript.