Skip to content

Commit

Permalink
Merge branch 'master' into newNargs
Browse files Browse the repository at this point in the history
  • Loading branch information
HDictus committed Jan 9, 2020
2 parents 09e8ed2 + f6c051d commit 9e0c2fc
Show file tree
Hide file tree
Showing 22 changed files with 224 additions and 170 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CompatHelper

on:
schedule:
- cron: '00 * * * *'

jobs:
CompatHelper:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.2.0]
julia-arch: [x86]
os: [ubuntu-latest]
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
12 changes: 12 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
jobs:
TagBot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
/usr

/docs/build

Manifest.toml
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ language: julia
os:
- linux
julia:
- 0.7
- 1.0
- 1.1
- 1.2
- 1.3
- 1
- nightly
matrix:
allow_failures:
Expand Down
14 changes: 9 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name = "DSP"
uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2"
version = "0.5.2"
version = "0.6.2"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
Expand All @@ -15,9 +14,14 @@ IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"

[compat]
Compat = ">= 1.3.0"
Polynomials = ">= 0.1.0"
julia = "0.7,1"
IterTools = ">= 1.0.0"
FFTW = "1.1"
OffsetArrays = "0.11"
Polynomials = "0.6"
Reexport = "0.2"
SpecialFunctions = "0.8, 0.9"
julia = "1"
IterTools = "1"
>>>>>>> master

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
7 changes: 0 additions & 7 deletions REQUIRE

This file was deleted.

3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[deps]
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "0.24"
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Documenter, DSP

DocMeta.setdocmeta!(DSP, :DocTestSetup, :(using DSP); recursive=true)

makedocs(
modules = [DSP],
format = :html,
format = Documenter.HTML(),
sitename = "DSP.jl",
pages = Any[
"Contents" => "contents.md",
Expand Down
17 changes: 6 additions & 11 deletions docs/src/util.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# `Util` - utility functions
```@meta
DocTestSetup = quote
using DSP
end
```

!!! note
As of version 0.6.1 of DSP.jl, `fftfreq` and `rfftfreq` have been moved from
DSP.jl to [AbstractFFTs.jl](https://github.com/JuliaMath/AbstractFFTs.jl)
version 0.5 and above. You can also access these functions through
[FFTW.jl](https://github.com/JuliaMath/FFTW.jl) version 1.1 and above.

```@docs
unwrap
unwrap!
hilbert
fftfreq
rfftfreq
nextfastfft
pow2db
amp2db
Expand All @@ -25,7 +24,3 @@ shiftsignal!
alignsignals
alignsignals!
```

```@meta
DocTestSetup = nothing
```
2 changes: 0 additions & 2 deletions src/DSP.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__precompile__()

module DSP

using FFTW
Expand Down
4 changes: 2 additions & 2 deletions src/Filters/filt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ end
# Zero phase digital filtering by processing data in forward and reverse direction
function iir_filtfilt(b::AbstractVector, a::AbstractVector, x::AbstractArray)
zi = filt_stepstate(b, a)
zitmp = copy(zi)
pad_length = 3 * (max(length(a), length(b)) - 1)
t = Base.promote_eltype(b, a, x)
zitmp = similar(zi, t)
extrapolated = Vector{t}(undef, size(x, 1)+pad_length*2)
out = similar(x, t)

Expand Down Expand Up @@ -312,9 +312,9 @@ end
# Zero phase digital filtering for second order sections
function filtfilt(f::SecondOrderSections{T,G}, x::AbstractArray{S}) where {T,G,S}
zi = filt_stepstate(f)
zitmp = similar(zi)
pad_length = 6 * length(f.biquads)
t = Base.promote_type(T, G, S)
zitmp = similar(zi, t)
extrapolated = Vector{t}(undef, size(x, 1)+pad_length*2)
out = similar(x, t)

Expand Down
19 changes: 17 additions & 2 deletions src/Filters/stream_filt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ mutable struct FIRArbitrary{T} <: FIRKernel{T}
hLen::Int
end

function FIRArbitrary(h::Vector, rate::Real, Nϕ::Integer)
function FIRArbitrary(h::Vector, rate_in::Real, Nϕ_in::Integer)
rate = convert(Float64, rate_in)
= convert(Int, Nϕ_in)
dh = [diff(h); zero(eltype(h))]
pfb = taps2pfb(h, Nϕ)
dpfb = taps2pfb(dh, Nϕ)
Expand All @@ -117,7 +119,20 @@ function FIRArbitrary(h::Vector, rate::Real, Nϕ::Integer)
inputDeficit = 1
xIdx = 1
hLen = length(h)
FIRArbitrary(rate, pfb, dpfb, Nϕ, tapsPerϕ, ϕAccumulator, ϕIdx, α, Δ, inputDeficit, xIdx, hLen)
FIRArbitrary(
rate,
pfb,
dpfb,
Nϕ,
tapsPerϕ,
ϕAccumulator,
ϕIdx,
α,
Δ,
inputDeficit,
xIdx,
hLen
)
end


Expand Down
4 changes: 4 additions & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ Base.@deprecate_binding TFFilter PolynomialRatio
Base.@deprecate_binding BiquadFilter Biquad
Base.@deprecate_binding SOSFilter SecondOrderSections

Base.@deprecate Frequencies(nreal::Int, n::Int, multiplier::Float64) FFTW.Frequencies(nreal, n, multiplier)
Base.@deprecate fftfreq(n::Int, fs::Real=1) FFTW.fftfreq(n, fs)
Base.@deprecate rfftfreq(n::Int, fs::Real=1) FFTW.rfftfreq(n, fs)

@deprecate conv2 conv
Loading

0 comments on commit 9e0c2fc

Please sign in to comment.