Skip to content

Commit

Permalink
Small additions to basin instability and tutorial (#147)
Browse files Browse the repository at this point in the history
* add notebook enhancements to the tutorial

* tiny change in basin instab
  • Loading branch information
Datseris committed Aug 20, 2024
1 parent 079fb59 commit 5961714
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Attractors"
uuid = "f3fd9213-ca85-4dba-9dfd-7fc91308fec7"
authors = ["George Datseris <[email protected]>", "Kalel Rossi", "Alexandre Wagemakers"]
repo = "https://github.com/JuliaDynamics/Attractors.jl.git"
version = "1.19.3"
version = "1.19.4"

[deps]
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"
Expand Down
14 changes: 14 additions & 0 deletions docs/src/tutorial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# </video>
# ```

#nb @doc Attractors

# [`Attractors`](@ref) is a component of the **DynamicalSystems.jl** library.
# This tutorial will walk you through its main functionality.
# That is, given a `DynamicalSystem` instance, find all its attractors and their basins
Expand All @@ -19,6 +21,18 @@
# but we won't cover anything else in this introductory tutorial.
# See the [examples](@ref examples) page instead.


# ### Package versions used

import Pkg

#nb # Activate an environment in the folder containing the notebook
#nb Pkg.activate(dirname(@__DIR__))
#nb Pkg.add(["DynamicalSystems", "CairoMakie", "GLMakie", "OrdinaryDiffEq", "BenchmarkTools"])

Pkg.status(["Attractors", "CairoMakie", "OrdinaryDiffEq"])


# ## Tutorial - copy-pasteable version

# _Gotta go fast!_
Expand Down
1 change: 1 addition & 0 deletions src/dict_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ end

"""
retract_keys_to_consecutive(v::Vector{<:Dict}) → rmap
Given a vector of dictionaries with various positive integer keys, retract all keys so that
consecutive integers are used. So if the dictionaries have overall keys 2, 3, 42,
then they will transformed to 1, 2, 3.
Expand Down
3 changes: 2 additions & 1 deletion src/matching/basin_enclosure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ which is estimated with the `distance` keyword, which can be anything
[`MatchBySSSetDistance`](@ref) accepts. The closest `₊` attractor gets the
ID of the `₋` closest attractor that converge to it.
Basin enclosure is a concept similar to "basin instability" in [Ritchie2023](@cite).
Basin enclosure is a concept similar to "basin (in)stability" in [Ritchie2023](@cite):
attractors that quantify as "basin stable" are matched.
"""
@kwdef struct MatchByBasinEnclosure{E, D, S, T} <: IDMatcher
ε::E = nothing
Expand Down
2 changes: 0 additions & 2 deletions src/matching/sssdistance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,3 @@ function _matching_map_distances(keys₊, keys₋, distances::Dict, threshold;

return rmap
end


0 comments on commit 5961714

Please sign in to comment.