Skip to content

Commit 0477fba

Browse files
author
dsweber2
committed
odd dog father wavelets had the wrong sign
1 parent f559cb4 commit 0477fba

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ContinuousWavelets"
22
uuid = "96eb917e-2868-4417-9cb6-27e7ff17528f"
33
authors = ["dsweber2 <david.weber2@protonmail.com> and contributors"]
4-
version = "1.1.2"
4+
version = "1.1.3"
55

66
[deps]
77
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ end
167167

168168
# this makes sure the averaging function is real and positive
169169
adjust(c::CWT) = 1
170-
adjust(c::CWT{W,T,<:Dog}) where {W,T} = 1 / (im)^(c.α)
170+
adjust(c::CWT{W,T,<:Dog}) where {W,T} = 1 / (-im)^(c.α)
171171

172172
function locationShift(c::CWT{W,T,<:Morlet,N}, s, ω, sWidth) where {W,T,N}
173173
s0 = 3 * c.σ[1] * s * sWidth

test/defaultProperties.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
# Guaranteed in a very different way for ContOrtho, and no guarantees made for just averaging
4242
@test max(abs.(Ŵ[end, :])...) / norm(supported, Inf) 1e-1
4343
end
44+
45+
# check that the father wavelet is actually positive
46+
@test real(sum(Ŵ[:, 1])) .> 0
47+
@test imag(sum(Ŵ[:, 1])) .>= 0
4448
end
4549
end

0 commit comments

Comments
 (0)