Skip to content

Commit 023d9bd

Browse files
authored
Fix convergence time for recurrences (#171)
Now it cannot be less than Δt, and it is also type stable. Closes #127
1 parent 26bde72 commit 023d9bd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Attractors"
22
uuid = "f3fd9213-ca85-4dba-9dfd-7fc91308fec7"
33
authors = ["George Datseris <[email protected]>", "Kalel Rossi", "Alexandre Wagemakers"]
44
repo = "https://github.com/JuliaDynamics/Attractors.jl.git"
5-
version = "1.24.3"
5+
version = "1.24.4"
66

77

88
[deps]

src/mapping/recurrences/attractor_mapping_recurrences.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,11 @@ function convergence_time(m::AttractorsViaRecurrences)
180180
# time of neighboring grid cells.
181181
x = get(kw, :consecutive_recurrences, 100) + get(kw, :attractor_locate_steps, 1000)
182182
elseif m.bsn_nfo.return_code == :bas_hit
183-
return NaN
183+
return typemax(bsn_nfo.Δt)
184184
else
185185
x = get(kw, :consecutive_attractor_steps, 2)
186186
end
187+
x = max(i, x) # it cannot be more than i!
187188
return (i - x + 1)*m.bsn_nfo.Δt
188189
end
189190

0 commit comments

Comments
 (0)