1D Fermat Number Transform deconvolution#14
1D Fermat Number Transform deconvolution#14jakubwro wants to merge 8 commits intoJuliaDSP:masterfrom jakubwro:master
Conversation
|
Build fails cause this PR is not merged yet JuliaRegistries/General#7482 |
| h = [3, 2, 0, 0] | ||
| y = [3, 5, 3, 0] | ||
| x = fermat(y, h, 4, 17) | ||
| @test Circulant(h) * x == y |
There was a problem hiding this comment.
Circular convolution again, it uses the same fft approach as above
https://github.com/JuliaMatrices/SpecialMatrices.jl/blob/master/src/toeplitz.jl#L54
I have feeling that we need some package with better api to perform convolution. I don't like the fact that floating point arithmetic is used here.
There was a problem hiding this comment.
It looks like you have a plan 🙂
giordano
left a comment
There was a problem hiding this comment.
The biggest limitation of this method is that each element of H matrix needs to have inverse, what is hard to achieve for real data, so I'm not sure if Deconvolution.jl is good place for algorithms like this.
While currently implemented methods are probably easier to use in practice, I don't see why this would be a problem for including this method here 😉
| h = [3, 2, 0, 0] | ||
| y = [3, 5, 3, 0] | ||
| x = fermat(y, h, 4, 17) | ||
| @test Circulant(h) * x == y |
There was a problem hiding this comment.
It looks like you have a plan 🙂
| xm = ifnt(H_inv .* fnt(convolved, g, q), g, q) | ||
| x0 = mod.(Dm * xm, q) | ||
| x0[x0 .>= bias] .-= q | ||
| x = x0 |
There was a problem hiding this comment.
x will be exactly the same thing as x0, this means that chaning x0 will have the same effect on x and vice versa. Is this what you want?
There was a problem hiding this comment.
Yes, this assignment is just to follow variable naming form the paper, x0 is not modified later, and new variable xj is introduced later int the loop.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 4 +1
Lines 25 48 +23
=========================================
+ Hits 25 48 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@giordano build is green, but please do not merge yet, I need to add docs and replace fft with precise integer convolution. To do that I think I will start a new project for integer DSP algorithms. |
I implemented 1D case of FNT deconvolution what partially solves #2 I'll update docs if it makes sense.
The biggest limitation of this method is that each element of H matrix needs to have inverse, what is hard to achieve for real data, so I'm not sure if Deconvolution.jl is good place for algorithms like this.