Skip to main content

Dynamic mode decompositon in python.

Project description

Documentation Status MIT License

Dynamic mode decomposition (DMD)is a tool for analyzing the dynamics of nonlinear systems.

This is an experimental DMD codebase for research purposes.

Alternatively, check out PyDMD, a professionally maintained open source DMD codebase for Python.

Installation:

pip install dmdlab

Usage:

from dmdlab import DMD, plot_eigs
import numpy as np
from scipy.linalg import logm

# Generate toy data
ts = np.linspace(0,6,50)

theta = 1/10
A_dst = np.array([[np.cos(theta), -np.sin(theta)],
                  [np.sin(theta), np.cos(theta)]])
A_cts = logm(A_dst)/(ts[1]-ts[0])

x0 = np.array([1,0])
X = np.vstack([expm(A_cts*ti)@x0 for ti in ts]).T

# Fit model
model = DMD.from_full(X, ts)

# Print the eigenvalue phases
print(np.angle(model.eigs))

>>> [0.1, -0.1]

For a technical reference, check out the DMD book.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dmdlab-0.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dmdlab-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file dmdlab-0.1.1.tar.gz.

File metadata

  • Download URL: dmdlab-0.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.6 Linux/4.15.0-96-generic

File hashes

Hashes for dmdlab-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8cecabdb4189942c3410094557b6b3588924fc4b9313b5f291c739e154168c75
MD5 7a69d973cd3059a73b7fdc45a0fac90b
BLAKE2b-256 cd9dfbd7c439bdd2033f87e78c917ff9e13585a72f7d9423bf764eff9e28674c

See more details on using hashes here.

File details

Details for the file dmdlab-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dmdlab-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.6 Linux/4.15.0-96-generic

File hashes

Hashes for dmdlab-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f39934ba350284aa2850e90922debcba6eca62c30526fd6af5e54800c0167875
MD5 afa86ba56e5d2f0f2a640f384915fec0
BLAKE2b-256 87e453b981a7c1795143234f117cd10dcc031912bca2023baae4cb392988d8d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page