Skip to content

Commit 5fb0115

Browse files
authored
Merge pull request #32 from JuliaDynamics/lmin
lmin must be 1 or greater
2 parents 8429e75 + ebdc4f5 commit 5fb0115

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rqa.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Calculate the determinism (DET) of a recurrence matrix, ruling out
6565
the points within the Theiler window and diagonals shorter than a minimum value.
6666
"""
6767
function determinism(diag_hist::Vector; lmin=2, kwargs...)
68-
if lmin < 2
69-
error("lmin must be 2 or greater")
68+
if lmin < 1
69+
error("lmin must be 1 or greater")
7070
end
7171
nbins = length(diag_hist)
7272
diag_points = collect(1:nbins) .* diag_hist
@@ -84,8 +84,8 @@ Calculate the average diagonal length (L) in a recurrence matrix, ruling out
8484
the points within the Theiler window and diagonals shorter than a minimum value.
8585
"""
8686
function avgdiag(diag_hist::Vector; lmin=2, kwargs...)
87-
if lmin < 2
88-
error("lmin must be 2 or greater")
87+
if lmin < 1
88+
error("lmin must be 1 or greater")
8989
end
9090
nbins = length(diag_hist)
9191
diag_points = collect(1:nbins) .* diag_hist
@@ -121,8 +121,8 @@ Calculate the Shannon entropy of diagonal lengths (ENT) of a recurrence matrix,
121121
the points within the Theiler window and diagonals shorter than a minimum value.
122122
"""
123123
function rqaentropy(diag_hist::Vector; lmin=2, kwargs...)
124-
if lmin < 2
125-
error("lmin must be 2 or greater")
124+
if lmin < 1
125+
error("lmin must be 1 or greater")
126126
end
127127
nbins = length(diag_hist)
128128
if lmin <= nbins

0 commit comments

Comments
 (0)