Skip to main content

Caospy

logo

Documentation Status Caospy MIT License Coverage Status https://github.com/leliel12/diseno_sci_sfw

Caospy is a Python package to analyze continuous dynamical systems and chaos.

Its utilities are:

  • Solve systems of ODEs.
  • Eigenvalues, eigenvectors and roots of equations.
  • Classification of fixed points in 1D and 2D.
  • Poincare maps.
  • Plots.

Some well studied systems are available in the library, like Lorenz’s system, the Logistic equation, Duffing’s system and the Rosslers-Chaos systems.

Motivation

Dynamic sisytems are one of the most researched niches of knowledge, their understanding is crucial in order to interact more effectively with our environment. In order to study any dynamical systems to an acceptable level of detail, the classical qualitative analysis fall short and different heuristic methods along with numerical approaches where born to better understand their behavior. Properties like fixed points stability or chaotic behavior, and phenomena like bifurcations are commonly obtained by means of using these so called heuristic methods. Caospy attempts to bring this different tools of analysis together in one Python package, and achieve the unification and regularization of their use in a common developing context, hoping it will provide an easier and more comprehensive analysis of the subject in question.

Requirements

You will need Python 3.9 or later to run Caospy.

Installation

Caospy is available at PyPI. You can install it via the pip command:

$ pip install Caospy

If you'd like to bleeding edge of the code or you want to run the latest version, you can clone this repo and then inside the local directory execute:

$ pip install -e .

Usage

Let's study the damped harmonic oscillator without driving force. It's a second order one dimensional ODE, but we'll reduce it to a system of first-order odes.

import caospy as cp
import matplotlib.pyplot as plt


var = ["x", "y"] # Variables
par = ["k", "c"] # Parameters
fun = ["y", "-c*y-k*x"] # Functions
name = "Damped harmonic oscillator" # System's name
Ode_2d = cp.TwoDim(var, fun, par, name)

t0 = 0 # Initial time
tf = 8 # End time
x0 = [0, 1] # Initial Conditions
par_value = [100, 1] # Parameter values
N = 500 # Number of time steps
sol = Ode_2d.time_evolution(x0, par_value, t0, tf, N)

fig, ax = plt.subplots()
ax = sol.plot_trajectory("t-x") # Plot the solution
ax.set_xlabel("t [s]")
ax.set_ylabel("x [cm]")

You'll get the next figure.

harmonic

For more examples, please refer to the tutorial in Documentation.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Authors

Juan Colman(E-mail: juancolmanot@gmail.com), Sebastián Nicolás Bertolo.

Release files for caospy 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caospy 0.0.1
File Size Uploaded
Caospy-0.0.1.tar.gz 18.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for caospy 0.0.1
File Interpreter ABI Platform
caospy-0.0.1-py3-none-any.whl Python 3 none any Details
Caospy-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 57.9 kB

Release files / Caospy-0.0.1.tar.gz

Download URL Caospy-0.0.1.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c75d9fbf6a44c19d3a5a607f55d4b3c08129e79034d2acc8a85ea6964918955a
BLAKE2b-256 checksum
How to use checksums
93c83b8c213861ea22ef9d8cd1c9a2af77621f7eae92616da1971b504fd39332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / caospy-0.0.1-py3-none-any.whl

Download URL caospy-0.0.1-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8f04f11917eb1812130fdb926afb444f0190bbd888fc5c3e958e413aef1550a
BLAKE2b-256 checksum
How to use checksums
76cd36a17bc5e3f7b058db4f8fb69f2c0b67ebd7d6d367195395a3f007c85090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / Caospy-0.0.1-py3-none-any.whl

Download URL Caospy-0.0.1-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcca7b4fe4228124365fd09732e6759ffd537047c831130a8edf3872f8546a86
BLAKE2b-256 checksum
How to use checksums
8265498aee89ad4015f97dff7aa3fe61f83f55b7d17132ee82653bf31d3d7f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page