Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move convolution code to Convolutions.jl submodule #613

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/src/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
Functions here are not exported.

```@docs
DSP.os_fft_complexity
DSP.os_prepare_conv
DSP.os_conv_block!
DSP.os_filter_transform!
DSP.Convolutions.os_fft_complexity
DSP.Convolutions.optimalfftfiltlength
DSP.Convolutions.os_prepare_conv
DSP.Convolutions.os_conv_block!
DSP.Convolutions.os_filter_transform!
DSP.Windows.makewindow
DSP.Windows.padplot
DSP._zeropad
DSP._zeropad!
DSP._zeropad_keep_offset
DSP.Convolutions._zeropad
DSP.Convolutions._zeropad!
DSP.Convolutions._zeropad_keep_offset
DSP.Filters._polyprep
DSP.Filters.freq_eval
DSP.Filters.build_grid
DSP.Filters.lagrange_interp
DSP.Periodograms.coherence_from_cs!
DSP.optimalfftfiltlength
```
4 changes: 2 additions & 2 deletions ext/OffsetArraysExt.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module OffsetArraysExt
import DSP
import DSP.Convolutions
import OffsetArrays

DSP.conv_axis_with_offset(::OffsetArrays.IdOffsetRange) = true
Convolutions.conv_axis_with_offset(::OffsetArrays.IdOffsetRange) = true

end
12 changes: 6 additions & 6 deletions src/DSP.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module DSP

using FFTW
using LinearAlgebra: Transpose, mul!, rmul!
using IterTools: subsets
using LinearAlgebra: mul!

export conv, conv!, deconv, filt, filt!, xcorr
export deconv, filt, filt!

# This function has methods added in `periodograms` but is not exported,
# so we define it here so one can do `DSP.allocate_output` instead of
# `DSP.Periodograms.allocate_output`.
function allocate_output end

include("dspbase.jl")
include("convolutions.jl")

include("dspbase.jl")
include("util.jl")

include("unwrap.jl")
include("windows.jl")
include("periodograms.jl")
Expand All @@ -23,7 +23,7 @@ include("estimation.jl")
include("diric.jl")

using Reexport
@reexport using .Util, .Windows, .Periodograms, .Filters, .LPC, .Unwrap, .Estimation
@reexport using .Util, .Windows, .Periodograms, .Filters, .LPC, .Unwrap, .Estimation, .Convolutions

include("deprecated.jl")
end
3 changes: 2 additions & 1 deletion src/Filters/Filters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import Base: *
using LinearAlgebra: I, mul!, rmul!
using Statistics: middle
using SpecialFunctions: ellipk
using ..DSP: optimalfftfiltlength, os_fft_complexity, SMALL_FILT_CUTOFF
using ..Convolutions: optimalfftfiltlength, os_fft_complexity
using ..DSP: SMALL_FILT_CUTOFF
import ..DSP: filt, filt!
using FFTW

Expand Down
2 changes: 1 addition & 1 deletion src/Filters/response.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Frequency response of a digital filter
#

using ..DSP: xcorr
using ..Convolutions: xcorr

"""
H, w = freqresp(filter::FilterCoefficients)
Expand Down
Loading
Loading