DSP.jl icon indicating copy to clipboard operation
DSP.jl copied to clipboard

Move convolution code to Convolutions.jl submodule

Open wheeheee opened this issue 1 year ago • 6 comments

Not sure if xcorr belongs in there, and currently the deconv function calls filt, so that can't be moved into convolutions.jl as-is either.

wheeheee avatar Dec 15 '24 10:12 wheeheee

Codecov Report

:x: Patch coverage is 97.81818% with 6 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 98.08%. Comparing base (7fc3842) to head (e828c21).

Files with missing lines Patch % Lines
src/convolutions.jl 97.81% 6 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #613      +/-   ##
==========================================
- Coverage   98.13%   98.08%   -0.06%     
==========================================
  Files          19       20       +1     
  Lines        3277     3288      +11     
==========================================
+ Hits         3216     3225       +9     
- Misses         61       63       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 15 '24 10:12 codecov[bot]

Not that I'm necessarily opposed to this, but what's the benefit?

martinholters avatar Dec 16 '24 08:12 martinholters

In #598 @dlfivefifty asked if convolutions could be moved out into a separate package. This PR would make it easier to do that, if the decision is made. One benefit would be that those who use only conv would have the choice to not load everything else here if they don't want to, and therefore be less affected by breaking releases in the rest of the package.

wheeheee avatar Dec 16 '24 09:12 wheeheee

I wonder about whether FFTW.jl should be a hard dependency. Alternatively, a simpler package ConvolutionsBase.jl which only defines conv and conv! without implementing them might be a better solution.

For example, in InfiniteArrays.jl overloads of conv I don't actually need the fft at all:

https://github.com/JuliaArrays/InfiniteArrays.jl/blob/master/ext/InfiniteArraysDSPExt.jl

dlfivefifty avatar Dec 16 '24 09:12 dlfivefifty

Right, if we want to move the convolutions stuff to a seperate repo, there are a bunch of questions to answer. But I don't think this PR or #598 are the best places to discuss that. Maybe open a dedicated issue or discussion?

WRT this PR, I think we should wait until that discussion has settled before actually setting into anything in motion. But as a draft to try things out, it might indeed be helpful.

martinholters avatar Dec 16 '24 11:12 martinholters

https://github.com/JuliaDSP/DSP.jl/issues/615

dlfivefifty avatar Dec 16 '24 16:12 dlfivefifty