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

Require Julia v1.10 or later #575

Merged
merged 2 commits into from
Nov 4, 2024
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
version: '1'
- os: ubuntu-latest
arch: x64
version: '1.6'
version: '1.10'
- os: ubuntu-latest
arch: x64
version: 'pre'
Expand All @@ -46,8 +46,6 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
with:
cache-registries: ${{ !(matrix.version == '1.6' && matrix.os == 'windows-latest') }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand Down
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.8.0"

[deps]
Bessels = "0e736298-9ec6-45e8-9647-e4fc86a2fe38"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -16,7 +15,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Bessels = "0.2"
Compat = "4.1"
DelimitedFiles = "1.6"
FFTW = "1.8"
IterTools = "1.4"
Expand All @@ -28,7 +26,7 @@ Reexport = "1.0"
SpecialFunctions = "2.0"
Statistics = "1.6"
Test = "1.6"
julia = "1.6"
julia = "1.10"

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
1 change: 0 additions & 1 deletion src/DSP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module DSP
using FFTW
using LinearAlgebra: mul!, rmul!
using IterTools: subsets
using Compat: Compat

export conv, deconv, filt, filt!, xcorr

Expand Down
1 change: 0 additions & 1 deletion src/Filters/Filters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ using Statistics: middle
using SpecialFunctions: ellipk
using ..DSP: optimalfftfiltlength, os_fft_complexity, SMALL_FILT_CUTOFF
import ..DSP: filt, filt!
using Compat: Compat
using FFTW

include("coefficients.jl")
Expand Down
10 changes: 5 additions & 5 deletions src/Filters/design.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Butterworth(::Type{T}, n::Integer) where {T<:Real}
poles = Vector{Complex{T}}(undef, n)
for i = 1:n÷2
w = convert(T, 2i - 1) / 2n
sinpi_w, cospi_w = Compat.@inline sincospi(w)
sinpi_w, cospi_w = @inline sincospi(w)
pole = complex(-sinpi_w, cospi_w)
poles[2i-1] = pole
poles[2i] = conj(pole)
Expand Down Expand Up @@ -43,7 +43,7 @@ function chebyshev_poles(::Type{T}, n::Integer, ε::Real) where {T<:Real}
c = cosh(μ)
for i = 1:n÷2
w = convert(T, 2i - 1) / 2n
sinpi_w, cospi_w = Compat.@inline sincospi(w)
sinpi_w, cospi_w = @inline sincospi(w)
pole = complex(b * sinpi_w, c * cospi_w)
p[2i-1] = pole
p[2i] = conj(pole)
Expand Down Expand Up @@ -94,7 +94,7 @@ function Chebyshev2(::Type{T}, n::Integer, ripple::Real) where {T<:Real}
k = one(T)
for i = 1:n÷2
w = convert(T, 2i - 1) / 2n
ze = Compat.@inline complex(zero(T), -inv(cospi(w)))
ze = @inline complex(zero(T), -inv(cospi(w)))
z[2i-1] = ze
z[2i] = conj(ze)
k *= abs2(p[2i]) / abs2(ze)
Expand Down Expand Up @@ -140,8 +140,8 @@ function _ellip(init::Number, landen::Vector{<:Real})
end
w = inv(winv)
end
@inline cde(u::Number, landen::Vector{<:Real}) = Compat.@inline _ellip(cospi(u / 2), landen)
@inline sne(u::Number, landen::Vector{<:Real}) = Compat.@inline _ellip(sinpi(u / 2), landen)
@inline cde(u::Number, landen::Vector{<:Real}) = @inline _ellip(cospi(u / 2), landen)
@inline sne(u::Number, landen::Vector{<:Real}) = @inline _ellip(sinpi(u / 2), landen)

# sne inverse
function asne(w::Number, k::Real)
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/response.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function _freqrange(filter::FilterCoefficients{:s})
filter = convert(ZeroPoleGain, filter)
w_interesting = sort!(Float64.(abs.([filter.p; filter.z])))
include_zero = !isempty(w_interesting) && iszero(w_interesting[1])
w_interesting = collect(Compat.Iterators.dropwhile(iszero, w_interesting))
w_interesting = collect(Iterators.dropwhile(iszero, w_interesting))
if isempty(w_interesting) # no non-zero poles or zeros
if !include_zero || !isfinite(1/filter.k)
return [0; 10 .^ (0:6)] # fallback
Expand Down
6 changes: 3 additions & 3 deletions src/dspbase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ function filt!(out::AbstractArray, b::Union{AbstractVector, Number}, a::Union{Ab
end

iszero(size(x, 1)) && return out
isone(sz) && return (k = b[1] / a[1]; Compat.@noinline mul!(out, x, k)) # Simple scaling without memory
isone(sz) && return (k = b[1] / a[1]; @noinline mul!(out, x, k)) # Simple scaling without memory

# Filter coefficient normalization
if !isone(a[1])
norml = a[1]
a = Compat.@noinline broadcast(/, a, norml)
b = Compat.@noinline broadcast(/, b, norml)
a = @noinline broadcast(/, a, norml)
b = @noinline broadcast(/, b, norml)
end
# Pad the coefficients with zeros if needed
bs<sz && (b = copyto!(zeros(eltype(b), sz), b))
Expand Down
Loading