Skip to content

Commit a9a9e39

Browse files
authored
Update README.md
1 parent 11ed149 commit a9a9e39

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ plot_summary(dmd)
111111

112112
PyDMD modules can also be wrapped with data preprocessors if desired. These wrappers will preprocess the data and postprocess data reconstructions automatically.
113113
```python3
114+
from pydmd import DMD
114115
from pydmd.preprocessing import zero_mean_preprocessing
115116

116117
# Build and fit an exact DMD model with data centering.
@@ -129,7 +130,7 @@ bopdmd = BOPDMD(
129130
num_trials=100, # Number of bagging trials to perform.
130131
trial_size=0.5, # Use 50% of the total number of snapshots per trial.
131132
eig_constraints={"imag", "conjugate_pairs"}, # Eigenvalues must be imaginary and conjugate pairs.
132-
varpro_opts_dict={"verbose":True}, # Use verbose variable projection updates.
133+
varpro_opts_dict={"tol":0.2, "verbose":True}, # Set convergence tolerance and use verbose updates.
133134
)
134135

135136
# Fit the BOP-DMD model.
@@ -138,7 +139,22 @@ bopdmd = BOPDMD(
138139
bopdmd.fit(X, t)
139140
```
140141

141-
Provided below is an example output of the `plot_summary()` function when given a DMD model fitted to mean-centered flow past a cylinder data available at dmdbook.com/DATA.zip. A rank-12 exact DMD model was used to generate this summary. Notice how eigenvalues, modes, and dynamics are color-coded to indicate associations, and that eigenvalue marker sizes indicate spatiotemporal mode amplitudes or importance. Plotter documentation can be found [here](https://pydmd.github.io/PyDMD/plotter.html).
142+
Provided below is an example output and call of the `plot_summary()` function when given a DMD model fitted to mean-centered flow past a cylinder data available at <ins>dmdbook.com/DATA.zip</ins>. A rank-12 exact DMD model was used to generate this summary. Notice how eigenvalues, modes, and dynamics are color-coded to indicate associations, and that eigenvalue marker sizes indicate spatiotemporal mode amplitudes or importance. Plotter documentation can be found [here](https://pydmd.github.io/PyDMD/plotter.html).
143+
```python3
144+
from pydmd.plotter import plot_summary
145+
146+
plot_summary(
147+
dmd, # <-- Fitted PyDMD model. Can be DMD, BOPDMD, etc.
148+
figsize=(12, 7),
149+
index_modes=(0, 2, 4),
150+
snapshots_shape=(449, 199),
151+
order="F",
152+
mode_cmap="seismic",
153+
dynamics_color="k",
154+
flip_continuous_axes=True,
155+
max_sval_plot=30,
156+
)
157+
```
142158
<p align="center">
143159
<img src="readme/summary-example.png" alt></br>
144160
<em>Sample output of the plot_summary function.</em>

0 commit comments

Comments
 (0)