You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-37Lines changed: 20 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@
43
43
*[Description](#description)
44
44
*[Dependencies and installation](#dependencies-and-installation)
45
45
*[Examples and Tutorials](#examples-and-tutorials)
46
+
*[Using PyDMD](#using-pydmd)
46
47
*[Awards](#awards)
47
48
*[References](#references)
48
49
*[Developers and contributors](#developers-and-contributors)
@@ -98,48 +99,30 @@ Here we show a simple application (taken from [tutorial 2](tutorials/tutorial2/t
98
99
<em>The system evolution reconstructed with dynamic mode decomposition</em>
99
100
</p>
100
101
101
-
## Quickstart Tutorial
102
-
As a simple example, we examine fluid flow past a cylinder vorticity data with Reynolds number $Re = 100$, available [here](dmdbook.com/DATA.zip).
103
-
```python3
104
-
# Import vorticity data and frame dimensions.
105
-
import numpy as np
106
-
import scipy.io as sio
107
-
108
-
mat = sio.loadmat("CYLINDER_ALL.mat")
109
-
X = mat["VORTALL"] # (89351, 151) numpy array of snapshot data
110
-
t = np.arange(X.shape[-1]) # (151,) numpy array of times of data collection
111
-
nx = mat["nx"][0][0]
112
-
ny = mat["ny"][0][0]
113
-
```
114
-
Users can perform DMD by initializing a PyDMD module that implements their DMD method of choice. Users may also pass a variety of parameters to their DMD models for added customization. Here, we show how a user might build an optimized DMD model with bagging.
102
+
## Using PyDMD
103
+
To perform DMD, simply begin by initializing a PyDMD module that implements your DMD method of choice. Here, we demonstrate how a user might build a customized BOP-DMD model. Models may then be fitted by calling the `fit()` method and passing in the necessary data. This step performs the DMD algorithm, after which users may use PyDMD plotting tools in order to visualize their results.
115
104
```python3
116
105
from pydmd importBOPDMD
106
+
from pydmd.plotter import plot_summary
117
107
118
-
# Build and fit a bagging, optimized DMD model.
108
+
# Build a bagging, optimized DMD (BOP-DMD) model.
119
109
dmd = BOPDMD(
120
-
svd_rank=15, # set the rank of the DMD fit
121
-
num_trials=100, # set the number of bagging trials to perform
122
-
trial_size=0.5, # use 50% of the total number of snapshots each trial
123
-
eig_constraints={"imag", "conjugate_pairs"}, #optional: constrain the eigenvalue structure
124
-
varpro_opts_dict={"tol":0.2, "verbose":True}, # optional: set variable projection parameters
110
+
svd_rank=15, # rank of the DMD fit
111
+
num_trials=100, # number of bagging trials to perform
112
+
trial_size=0.5, # use 50% of the total number of snapshots per trial
113
+
eig_constraints={"imag", "conjugate_pairs"}, # constrain the eigenvalue structure
114
+
varpro_opts_dict={"tol":0.2, "verbose":True}, # set variable projection parameters
125
115
)
126
-
dmd.fit(X, t)
127
-
```
128
116
129
-
```python3
130
-
from pydmd.plotter import plot_summary
117
+
# Fit the DMD model.
118
+
# X = (n, m) numpy array of time-varying snapshot data
119
+
# t = (m,) numpy array of times of data collection
120
+
dmd.fit(X, t)
131
121
132
122
# Display a summary of the DMD results.
133
-
plot_summary(
134
-
dmd,
135
-
index_modes=[0, 1, 3],
136
-
snapshots_shape=(nx, ny),
137
-
order="F",
138
-
figsize=(12, 6),
139
-
)
123
+
plot_summary(dmd)
140
124
```
141
-
142
-
Here we also provide a flow chart that outlines how one might choose an appropriate DMD optimization or methodological variant based on their specific problem type or data set. Note that the color-coding of this flowchart follows that of the PyDMD Capabilities diagram.
125
+
Note that modules and functions may be parameterized by a variety of inputs for added customization, so we generally recommend that new users refer to module documentation, plotting tool documentation, and to our module-specific [tutorials](tutorials/README.md) for more information. For users who are unsure of which DMD method is best for them, we provide the following flow chart, which outlines how one might choose an appropriate DMD variant based on specific problem types or data sets.
143
126
144
127
<palign="center">
145
128
<img src="readme/pydmd_guide.svg" width="1000" />
@@ -166,20 +149,20 @@ To implement the various versions of the DMD algorithm we follow these works:
166
149
***Bagging, optimized DMD:** Sashidhar, Kutz. *Bagging, optimized dynamic mode decomposition for robust, stable forecasting with spatial and temporal uncertainty quantification*. Proceedings of the Royal Society A, 2022. [[DOI](https://doi.org/10.1098/rsta.2021.0199)][[bibitem](readme/refs/Sashidhar2022.bib)].
167
150
168
151
### DMD Variants: Additional Methods and Extensions
169
-
***DMD with control:** Proctor, Brunton, Kutz. *Dynamic mode decomposition with control*. SIAM Journal on Applied Dynamical Systems, 2016. [[DOI](https://doi.org/10.1137/15M1013857)][[bibitem](readme/refs/Proctor2016.bib)].
152
+
***DMD with Control:** Proctor, Brunton, Kutz. *Dynamic mode decomposition with control*. SIAM Journal on Applied Dynamical Systems, 2016. [[DOI](https://doi.org/10.1137/15M1013857)][[bibitem](readme/refs/Proctor2016.bib)].
***Higher order DMD:** Le Clainche, Vega. *Higher order dynamic mode decomposition*. Journal on Applied Dynamical Systems, 2017. [[DOI](https://doi.org/10.1137/15M1054924)][[bibitem](readme/refs/LeClainche2017.bib)].
157
+
***Higher Order DMD:** Le Clainche, Vega. *Higher order dynamic mode decomposition*. Journal on Applied Dynamical Systems, 2017. [[DOI](https://doi.org/10.1137/15M1054924)][[bibitem](readme/refs/LeClainche2017.bib)].
175
158
***HAVOK:** Brunton, Brunton, Proctor, Kaiser, Kutz. *Chaos as an intermittently forced linear system*. Nature Communications, 2017. [[DOI](https://doi.org/10.1038/s41467-017-00030-8)][[bibitem](readme/refs/Brunton2017.bib)].
176
-
***Parametric DMD:** Andreuzzi, Demo, Rozza. *A dynamic mode decomposition extension for the forecasting of parametric dynamical systems*. 2021. [[DOI](https://doi.org/10.1137/22M1481658)][[bibitem](readme/refs/Andreuzzi2021.bib)].
159
+
***Parametric DMD:** Andreuzzi, Demo, Rozza. *A dynamic mode decomposition extension for the forecasting of parametric dynamical systems*. SIAM Journal on Applied Dynamical Systems, 2023. [[DOI](https://doi.org/10.1137/22M1481658)][[bibitem](readme/refs/Andreuzzi2021.bib)].
177
160
***Extended DMD:** Williams, Rowley, Kevrekidis. *A kernel-based method for data-driven koopman spectral analysis*. Journal of Computational Dynamics, 2015. [[DOI](https://doi.org/10.3934/jcd.2015005)][[bibitem](readme/refs/Williams2015.bib)].
178
161
***LANDO:** Baddoo, Herrmann, McKeon, Brunton. *Kernel learning for robust dynamic mode decomposition: linear and nonlinear disambiguation optimization*. Proceedings of the Royal Society A, 2022. [[DOI](https://doi.org/10.1098/rspa.2021.0830)][[bibitem](readme/refs/Baddoo2022.bib)].
179
162
180
163
### Implementation Tools and Preprocessing
181
164
* Gavish, Donoho. *The optimal hard threshold for singular values is 4/sqrt(3)*. IEEE Transactions on Information Theory, 2014. [[DOI](https://doi.org/10.1109/TIT.2014.2323359)][[bibitem](readme/refs/Gavish2014.bib)].
182
-
* Matsumoto, Indinger. *On-the-fly algorithm for Dynamic Mode Decomposition using Incremental Singular Value Decomposition and Total Least Squares*. 2017. [[arXiv](https://arxiv.org/abs/1703.11004)][[bibitem](readme/refs/Matsumoto2017.bib)].
165
+
* Matsumoto, Indinger. *On-the-fly algorithm for dynamic mode decomposition using incremental singular value decomposition and total least squares*. 2017. [[arXiv](https://arxiv.org/abs/1703.11004)][[bibitem](readme/refs/Matsumoto2017.bib)].
183
166
* Hirsh, Harris, Kutz, Brunton. *Centering data improves the dynamic mode decomposition*. SIAM Journal on Applied Dynamical Systems, 2020. [[DOI](https://doi.org/10.1137/19M1289881)][[bibitem](readme/refs/Hirsh2020.bib)]
0 commit comments