qsib-cbie / sci-rs

Rust Scientific Analysis similar to SciPy
Apache License 2.0
26 stars 8 forks source link

Decimate discussion #51

Open SpookyYomo opened 3 months ago

SpookyYomo commented 3 months ago

Hi, I'm interested in implementing scipy.signal.Decimate, but from what I'm understanding looking through the repository currently, we need to implement firwin and other related Finite Impulse Response things and similar first to have feature parallel to Decimate? I'd like to discuss what's the best way forward.

trueb2 commented 2 months ago

The way we have been going about things is to translate the internal bits of a SciPy function, going one function at a time where it has a reasonable Rust equivalent. We can use the output of the SciPy implementation to confirm correctness.

It might be easier to identify a subset of functions to add first for the FIR stuff.

SpookyYomo commented 1 month ago

Looking through both this repository and Scipy's I couldn't quite identify what the "root" class would start off all the necessary FIR functionality.

The biggest function used in decimate specific to FIR would be firwin, resample_poly and upfirdn besides the dlti stuff for non-FIR case, along with other IIR necessary.

Perhaps I can attempt to try implement firwin first...?

trueb2 commented 1 month ago

firwin on its own would be a good addition. I agree that it looks like a good starting point.