-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2199633
commit 3df2ea7
Showing
8 changed files
with
9,127 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,13 @@ uuid = "55704126-756f-498a-a54f-434b72ecbddd" | |
authors = ["Nathanael Bosch <[email protected]> and contributors"] | ||
version = "1.0.0-DEV" | ||
|
||
[deps] | ||
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" | ||
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" | ||
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" | ||
|
||
[compat] | ||
julia = "1.6" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,52 @@ | ||
# Dysts | ||
# Dysts.jl: A Julia Port of [`dysts`](https://github.com/williamgilpin/dysts) | ||
|
||
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://nathanaelbosch.github.io/Dysts.jl/stable/) | ||
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://nathanaelbosch.github.io/Dysts.jl/dev/) | ||
[![Build Status](https://github.com/nathanaelbosch/Dysts.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/nathanaelbosch/Dysts.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
[![Coverage](https://codecov.io/gh/nathanaelbosch/Dysts.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/nathanaelbosch/Dysts.jl) | ||
|
||
## Overview | ||
|
||
Dysts.jl is a Julia port of the "dysts" package originally developed by William Gilpin. The original code is publicly available under the Apache-2.0 license, and we extend our gratitude to William for his contribution to the project. This port was made possible by leveraging the power of GitHub Copilot for code generation, as well as incorporating helpful Emacs/Vim macros. | ||
|
||
## Acknowledgments | ||
|
||
- William Gilpin: The original author of the "dysts" package. We stand on the shoulders of his work, and much credit goes to him for creating the foundation. | ||
- GitHub Copilot: The AI-powered coding assistant that played a significant role in accelerating the porting process. It's an invaluable tool for collaborative and efficient code development. | ||
- Emacs/Vim Macros: Shoutout to the classic text editors and their macros that facilitated the coding experience, making repetitive tasks more manageable. | ||
|
||
## Package Description | ||
|
||
Dysts.jl is a collection of strange attractors implemented as functions returning ODEProblems. These ODE problems are fully compatible with the DifferentialEquations.jl ecosystem. Unlike the original "dysts" package, this port focuses solely on creating the ODEs and does not provide tools for discrete solution methods. | ||
|
||
## Features | ||
- Chaotic ODEs: Explore a variety of chaotic systems represented as ODEs. | ||
- DifferentialEquations.jl Compatibility: Easily integrate these chaotic systems into the DifferentialEquations.jl ecosystem for seamless exploration and analysis. | ||
|
||
## Installation | ||
|
||
```julia | ||
|
||
import Pkg | ||
Pkg.add("Dysts") | ||
``` | ||
|
||
## Usage | ||
|
||
```julia | ||
using Dysts, DifferentialEquations, Plots | ||
|
||
prob = Dysts.Lorenz | ||
sol = solve(prob, Tsit5()) | ||
plot(sol, vars=(1,2,3)) | ||
``` | ||
|
||
For more details and available attractors, refer to the original [`dysts`](https://github.com/williamgilpin/dysts) package. | ||
|
||
## Contributing | ||
|
||
Feel free to contribute by opening issues, suggesting improvements, or creating pull requests. Your feedback and participation are highly encouraged! | ||
|
||
## License | ||
|
||
Dysts.jl is licensed under the Apache-2.0 License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Dysts = "55704126-756f-498a-a54f-434b72ecbddd" | ||
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,82 @@ | ||
module Dysts | ||
|
||
# Write your package code here. | ||
using JSON, Markdown | ||
using LinearAlgebra | ||
using SciMLBase | ||
using ComponentArrays | ||
|
||
|
||
function dict_with_string_keys_to_symbol_keys(d::Dict) | ||
new_d = Dict() | ||
for (k, v) in d | ||
new_d[Symbol(k)] = v | ||
end | ||
return new_d | ||
end | ||
|
||
function dict_to_componentarray(d::Dict) | ||
return ComponentArray(dict_with_string_keys_to_symbol_keys(d)) | ||
end | ||
|
||
|
||
function make_docstring(f) | ||
data = ATTRACTOR_DATA[string(f)] | ||
header = """ | ||
$f() | ||
$(data["description"]) | ||
""" | ||
|
||
stats = """ | ||
## Stats | ||
""" | ||
"correlation_dimenension" in keys(data) && (stats *= """ | ||
- Correlation dimension: $(data["correlation_dimension"]) | ||
""") | ||
"embedding_dimension" in keys(data) && (stats *= """ | ||
- Embedding dimension: $(data["embedding_dimension"]) | ||
""") | ||
"hamiltonian" in keys(data) && (stats *= """ | ||
- Hamiltonian: $(data["hamiltonian"]) | ||
""") | ||
"kaplan_yorke_dimension" in keys(data) && (stats *= """ | ||
- Kaplan-Yorke dimension: $(data["kaplan_yorke_dimension"]) | ||
""") | ||
"lyapunov_spectrum_estimated" in keys(data) && (stats *= """ | ||
- Lyapunov spectrum (estimated): $(data["lyapunov_spectrum_estimated"]) | ||
""") | ||
"maximum_lyapunov_estimated" in keys(data) && (stats *= """ | ||
- Maximum Lyapunov exponent (estimated): $(data["maximum_lyapunov_estimated"]) | ||
""") | ||
"multiscale_entropy" in keys(data) && (stats *= """ | ||
- Multiscale Entropy: $(data["multiscale_entropy"]) | ||
""") | ||
"nonautonomous" in keys(data) && (stats *= """ | ||
- Non-autonomous: $(data["nonautonomous"]) | ||
""") | ||
"period" in keys(data) && (stats *= """ | ||
- Period: $(data["period"]) | ||
""") | ||
"pesin_entropy" in keys(data) && (stats *= """ | ||
- Pesin entropy: $(data["pesin_entropy"]) | ||
""") | ||
|
||
citation = """ | ||
## Citation | ||
$(data["citation"]) | ||
""" | ||
|
||
code_string = """ | ||
## Original Python Code from the `dysts` package | ||
```python | ||
""" * originalcode(f) * """ | ||
``` | ||
""" | ||
|
||
return header * stats * citation * code_string | ||
end | ||
|
||
include("chaotic_attractors.jl") | ||
|
||
end |
Oops, something went wrong.