We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d896cc commit 5bad925Copy full SHA for 5bad925
pydmd/costs.py
@@ -485,6 +485,8 @@ def fit(
485
time_window = original_time_window - t_start
486
487
# Subtract off the time mean before rounding corners.
488
+ c = np.mean(data_window, 1, keepdims=True)
489
+ data_window = data_window - c
490
data_window -= np.mean(data_window, 1, keepdims=True)
491
492
# Round the corners of the window.
@@ -515,9 +517,7 @@ def fit(
515
517
self._amplitudes_array[
516
518
k, : optdmd.eigs.shape[0]
519
] = optdmd.amplitudes
- self._window_means_array[k] = np.mean(
- data_window, 1, keepdims=True
520
- ).flatten()
+ self._window_means_array[k] = c.flatten()
521
self._time_array[k] = original_time_window
522
523
# Reset optdmd between iterations
0 commit comments