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
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,7 @@ plot_summary(dmd)
111
111
112
112
PyDMD modules can also be wrapped with data preprocessors if desired. These wrappers will preprocess the data and postprocess data reconstructions automatically.
113
113
```python3
114
+
from pydmd importDMD
114
115
from pydmd.preprocessing import zero_mean_preprocessing
115
116
116
117
# Build and fit an exact DMD model with data centering.
@@ -129,7 +130,7 @@ bopdmd = BOPDMD(
129
130
num_trials=100, # Number of bagging trials to perform.
130
131
trial_size=0.5, # Use 50% of the total number of snapshots per trial.
131
132
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.
133
134
)
134
135
135
136
# Fit the BOP-DMD model.
@@ -138,7 +139,22 @@ bopdmd = BOPDMD(
138
139
bopdmd.fit(X, t)
139
140
```
140
141
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
+
```
142
158
<palign="center">
143
159
<imgsrc="readme/summary-example.png"alt></br>
144
160
<em>Sample output of the plot_summary function.</em>
0 commit comments