Skip to content

Commit 751027b

Browse files
author
dsweber2
committed
get remote tests working.
1 parent 1299db0 commit 751027b

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

test/basicTypesAndNumber.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
boundaries = (DEFAULT_BOUNDARY, padded, NaivePer)
55
sVals = [1, 2, 3.5, 8, 16]
66
βs = [1, 1.5,4.0]
7-
waveTypes =(morl, dog0, paul4, cDb2)
7+
waveTypes =(ContinuousWavelets.morl, dog0, paul4, cDb2)
88
@testset "xSz=$xSize, b=$boundary, s=$s, β=, wfc=$(wave)" for xSize in xSizes, boundary in boundaries, s in sVals, β in βs, wave in waveTypes
9-
wfc = wavelet(wave, s=s, boundary=boundary,β=β)
9+
wfc = ContinuousWavelets.wavelet(wave, s=s, boundary=boundary,β=β)
1010
xr = rand(Float64, xSize);
1111
x32 = rand(Float32, xSize);
1212
xc = rand(ComplexF64, xSize);
1313
# the sizes are of course broken at this size, so no warnings needed
1414
yc = 3; yr = 3; y32 = 3
1515
with_logger(ConsoleLogger(stderr, Logging.Error)) do
16-
yr = cwt(xr, wfc);
17-
y32 = cwt(x32, wfc);
18-
yc = cwt(xc, wfc);
16+
yr = ContinuousWavelets.cwt(xr, wfc);
17+
y32 = ContinuousWavelets.cwt(x32, wfc);
18+
yc = ContinuousWavelets.cwt(xc, wfc);
1919
end
2020
if isAnalytic(wfc.waveType)
2121
@test eltype(yr) == ComplexF64

test/defaultProperties.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#wave = cwts[5]; bc = bcs[3]; β=βs[1]; ave = averagingLengths[1]; n = ns[1]
22
@testset "Wavelet properties" begin
3-
bcs =(PerBoundary(),SymBoundary(), ZPBoundary())
4-
cwts = (cDb2,dog1,dog2,paul1,morl)
3+
bcs =(ContinuousWavelets.PerBoundary(),ContinuousWavelets.SymBoundary(), ContinuousWavelets.ZPBoundary())
4+
cwts = (cDb2,ContinuousWavelets.dog1,ContinuousWavelets.dog2,ContinuousWavelets.paul1,ContinuousWavelets.morl)
55
βs =(1,4)
66
ns = (128, 1382,2039)
77
averagingLengths=(0,.5,1,2,4)
88
@testset "length $n, with type $wave, bc $bc, β=, ave=$(ave)" for n in ns, wave in cwts, bc in bcs, β in βs, ave in averagingLengths
9-
wav = wavelet(wave, β=β,boundary=bc,averagingLength = ave)
9+
wav = ContinuousWavelets.wavelet(wave, β=β,boundary=bc,averagingLength = ave)
1010
Ŵ,ω = (3,1)
1111
with_logger(ConsoleLogger(stderr, Logging.Error)) do
12-
Ŵ,ω = computeWavelets(n, wav)
12+
Ŵ,ω = ContinuousWavelets.computeWavelets(n, wav)
1313
end
1414
if wav.waveType isa Union{<:Morlet, <:Paul}
1515
nFreq, nSpace = ContinuousWavelets.setn(n, wav)

test/deltaSpikes.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
n = 2039; n1 = n
22
# wav = wavs[2]; k = ks[1]
33
@testset "Delta Spikes" begin
4-
wavs = (wavelet(cDb2), wavelet(cCoif4), wavelet(cBeyl))
4+
wavs = (ContinuousWavelets.wavelet(cDb2), ContinuousWavelets.wavelet(cCoif4), ContinuousWavelets.wavelet(cBeyl))
55
ks = (1093, 408)
66
@testset "at $k, with type $(wav.waveType)" for k in ks, wav in wavs
77
x = zeros(n); x[k]=1
88
res=3
99
with_logger(ConsoleLogger(stderr, Logging.Error)) do
10-
res = cwt(x, wav)
10+
res = ContinuousWavelets.cwt(x, wav)
1111
end
1212
peaks = argmax(abs.(res), dims=1)
13-
@test k-2 < peaks[end][1] < k+2 # give slight range to handle rounding issues
13+
@test k-2 <= peaks[end][1] <= k+2 # give slight range to handle rounding issues
1414
Ŵ,ω = (3,1)
1515
with_logger(ConsoleLogger(stderr, Logging.Error)) do
16-
Ŵ,ω = computeWavelets(n,wav)
16+
Ŵ,ω = ContinuousWavelets.computeWavelets(n,wav)
1717
end
1818
W = irfft(Ŵ, 2n,1)
1919
@test !any(abs.(circshift(W[:,3],k-1)[1:n] .- res[:,3]) .> 1e-10)

test/inversionTests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#wave = cwts[4]; bc = bcs[1]; β=βs[2]; ave = averagingLengths[end]; n = ns[1]; testF = typesOfTestFunctions[1]; inverseType = inversionMethods[3]
22
#wave = morl; bc = ZPBoundary(); ave = -1; n = 1382; testF = "just Core"; inverseType = DualFrames(); β = 1.5; eOct = 0
33
@testset "Inversion" begin
4-
bcs =(PerBoundary(), ZPBoundary(),)
5-
cwts = (dog2,morl)
4+
bcs =(ContinuousWavelets.PerBoundary(), ContinuousWavelets.ZPBoundary(),)
5+
cwts = (ContinuousWavelets.dog2,ContinuousWavelets.morl)
66
βs =(1,)
77
averagingLengths=(0,)
88
extraOctaves=(0,)
@@ -18,9 +18,9 @@
1818
x = testfunction(n,testF)
1919
end
2020

21-
wav = wavelet(wave, β=β,boundary=bc,averagingLength = ave, extraOctaves = eOct)
21+
wav = ContinuousWavelets.wavelet(wave, β=β,boundary=bc,averagingLength = ave, extraOctaves = eOct)
2222
with_logger(ConsoleLogger(stderr, Logging.Error)) do
23-
res = cwt(x, wav)
23+
res = ContinuousWavelets.cwt(x, wav)
2424
xRecon = real.(ContinuousWavelets.icwt(res, wav, inverseType))
2525
err = norm(xRecon-x)/norm(x)
2626
@test err < 3 # none of them are wildly off

0 commit comments

Comments
 (0)