liamappelbe / fftea

A simple and efficient FFT implementation for Dart
Apache License 2.0
63 stars 1 forks source link

feat(gaussian_window): added gaussian window #43

Open codakkk opened 10 months ago

codakkk commented 10 months ago

I didn't find any resource about contributing (code standards, etc), so if there's any error just report me and I'll fix them. I just need to write some tests but should work

codakkk commented 10 months ago

This needs some tests. In fact, tests are probably going to be the bulk of this PR :P

The tests should verify the window vs some reference implementation. The goal is to verify that your implementation produces the same output as the reference, for the same inputs.

At the moment, all my reference implementations are in python, and generate_test.py generates a bunch of expected outputs (saved in the test/data folder) and Dart test files (eg the generated test file misc_generated_test.dart, where all the window tests are).

So the easiest way to add tests be to find a reference implementation in python (eg in scipy), then just update generate_test.py to generate some gaussian window tests. You can copy and modify the other window tests, and reuse all the existing infrastructure. In fact you probably just need to add another makeWindowCase call (or a few of them with different alpha values).

Ok! I am currently occupied with my university thesis and will complete those tests as soon as possible. Thank you!