Skip to content

Commit 8b4dd4b

Browse files
committed
even better test reorganization
1 parent a9e6512 commit 8b4dd4b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/probabilities_estimators/timescales/power_spectrum.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ and return the spectrum normalized to sum = 1 as probabilities.
99
The Shannon entropy of these probabilities is typically referred in the literature as
1010
_spectral entropy_, e.g. [^Llanos2016],[^Tian2017].
1111
12-
The simpler the temporal structure of the timeseries, the lower the entropy. However,
12+
The closer the spectrum is to flat, i.e., white noise, the higher the entropy. However,
1313
you can't compare entropies of timeseries with different length, because the binning
1414
in spectral space depends on the length of the input.
1515
1616
[^Llanos2016]:
1717
Llanos et al., _Power spectral entropy as an information-theoretic correlate of manner
1818
of articulation in American English_, [The Journal of the Acoustical Society of America
19-
141, EL127 (2017); https://doi.org/10.1121/1.4976109]
19+
141, EL127 (2017)](https://doi.org/10.1121/1.4976109)
2020
2121
[^Tian2017]:
2222
Tian et al, _Spectral Entropy Can Predict Changes of Working Memory Performance Reduced

test/runtests.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ using Wavelets
55
using StaticArrays
66
using Neighborhood: KDTree, BruteForce
77

8-
# This is how the tests should look like in the end:
9-
@testset "Entopies.jl tests" begin
10-
include("timescales.jl")
8+
# TODO: This is how the tests should look like in the end:
9+
defaultname(file) = splitext(basename(file))[1]
10+
testfile(file, testname=defaultname(file)) = @testset "$testname" begin; include(file); end
11+
@testset "Entopies.jl" begin
12+
testfile("timescales.jl")
1113
end
1214

1315
@testset "Histogram estimation" begin

test/timescales.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ using Entropies, Test
1515
@test entropy_renyi(x, WaveletOverlap(), q = 1, base = 2) isa Real
1616
end
1717

18-
@testet "Fourier Spectrum" begin
18+
@testset "Fourier Spectrum" begin
1919
N = 1000
2020
t = range(0, 10π, N)
2121
x = sin.(t)

0 commit comments

Comments
 (0)