- Now work only with numpy arrays (not matrices)! Many method names have been changed.
- Implemented the total least-squares variant of DMD, which deals with noise better than standard DMD does. Also did a major rewrite of the unit tests, which now check mathematical properties, rather than comparing the results of
modred
routines to alternate (e.g., brute force) implementations. The new unit tests are more robust and fail much less often. - Note that a previously unrecorded bug fix has been added to the release notes for version 2.0.2 (regarding correct handling of complex-valued data in computing inner product arrays).
New features and improvements
- Can now compute adjoint DMD modes.
Bug fixes
hostname
is now determined using a Windows-friendly method.- OKID test files now included when installing using
pip
. - Fixed some minor bugs in example files, which now run.
- Correctly handle
mode_indices=None
option in :pyVecSpaceHandles.lin_combine
. - Complex-valued vectors are now correctly handled in :py
InnerProductTrapz
.
Interface changes
inner_product
is now a keyword argument inPODHandles
,BPODHandles
, andDMDHandles
, since sometimes instances of these classes are created to compute modes, which does not require computing any inner products.- Added "direct" to methods for projection coefficients in BPOD.
- Changed symmetric to symm, i.e., :py
VecSpaceHandles.compute_symmetric_inner_product_array
is now :pyVecSpaceHandles.compute_symm_inner_product_array
. - Changed return values in array methods for all decomps. Now a single namedtuple is returned, with fields for various internal data, such as
results.eigvals
. - :py
parallel
is now a module, not a class. This way users don't have to worry about using the default instance or accidentally creating new instances. - The attribute
summed_correlation_mats
has been renamedsum_correlation_mat
to make it clear that the attribute contains a single matrix. All corresponding methods have been renamed accordingly. - Added compute_adjoint_modes for DMD, TLSqrDMD.
- Added get method for POD projection coefficients.
- Added get method for BPOD projection coefficients.
- Added get methods for DMD handles.
- Added get methods for TLSqrDMD handles.
- Added
broadcast
method toparallel
module. mode_indices
is now optional in the various compute modes methods
Internal changes
- Exact DMD modes now scaled by DMD eigenvalues.
- Left and right eigenvectors are now computed using scipy.linalg.eig, rather than using numpy.eig twice, once on the original array and once on its conjugate transpose. This avoids potential numerical issues that cause disagreement between the eigenvalues of the original array and its conjugate transpose (which should be the same, theoretically).
- Removed trailing whitespace from files, as is often done automatically when using Emacs.
- Rewrote total-least squares DMD tests.
- Rewrote DMD tests.
- Rewrote BPOD tests.
- Rewrote POD tests.
- Rewrote ERA tests.
- Improved error checking in :py
InnerProductTrapz
.
Fixed bug for Windows environments. Updated documentation to use Read the Docs.
Bug fixes
parallel
modules now usessocket
module instead ofos
module to find hostname, which is portable to Windows environments.
Minor bug fix to OKID tests.
Bug fixes
- OKID files needed for tests are included in the source distribution. All doc files are also included.
Minor bug fixes.
Bug fixes
- Complex-valued vectors are now correctly handled in :py
VecSpaceHandles.compute_inner_product_mat
and :pyVecSpaceHandles.compute_symmetric_inner_product_mat
.
Interface changes
- Order of returned values for :py
dmd.compute_DMD_matrices_snaps_method
and :pydmd.compute_DMD_matrices_direct_method
is now consistent for both values ofreturn_all
.
Minor bug fix.
Bug fixes
- :py
dmd.DMDHandles.compute_spectrum
now returns real numbers, as it should have before, instead of complex values.
Main changes are an updated interface for DMD that matches the latest theory and support for Python 3. Python 3 support was primarily implemented by Pierre Augier (pa371 [-at-] damtp [-dot-] cam [-dot-] ac [-dot-] uk). Thanks, Pierre!
New features and improvements
- Python 3 is now supported!
- Documentation has been updated for clarity and consistency, and example code works with the latest interface.
DMD implementation now matches newest theory, laid out in a 2014 paper by Tu et al. in the Journal of Computational Dynamics. Features were only added, i.e., none were removed. Any DMD computations previously done using modred can be reproduced, though the names of some function calls have changed. Namely, :py
dmd.DMDHandles.compute_proj_modes
replaces :pydmd.DMDHandles.compute_modes
, and :pydmd.DMDHandles.put_eigvals
replaces :pydmd.DMDHandles.put_ritz_vals
. Generally, the term "projected modes" has replaced "modes," and similarly "eigenvalues" has replaced "Ritz values." "Exact modes" are now availble in addition to the projected modes.A full list of the new functions consists of: :py
dmd.DMDHandles.compute_exact_modes
, :pydmd.DMDHandles.compute_proj_modes
, :pydmd.DMDHandles.compute_spectrum
, :pydmd.DMDHandles.compute_proj_coeffs
, :pydmd.DMDHandles.compute_eigendecomp
, :pydmd.DMDHandles.put_spectral_coeffs
, and :pydmd.DMDHandles.put_eigvals
.- The
compute_decomp
step in DMD has been refactored, resulting in the new method :pydmd.DMDHandles.compute_eigendecomp
. This method can be used to restart DMD computations from saved correlation and cross-correlation matrices, or to compute a DMD using a truncated basis. - Absolute and relative tolerances can now be passed in using the keyword arguments
atol
andrtol
, respectively, when callingcompute_decomp
in either POD, BPOD, or DMD. These are then passed on into internal computations of singular value decompositions or eigendecompositions of positive definite matrices. They allow the user to filter out singular values or eigenvalues that should be considered numerical artifacts. They can also be used to truncate the computations and limit the number of modes making up the decompositions. - In DMD, truncation can also be achieved by setting the keyword argument
max_num_eigvals
in either :pydmd.DMDHandles.compute_decomp
or :pydmd.DMDHandles.compute_eigendecomp
. - Added new methods that compute the projection of the original data vectors onto the modes, for POD, BPOD, and DMD, respectively: :py
pod.PODHandles.compute_proj_coeffs
, :pybpod.BPODHandles.compute_proj_coeffs
, :pybpod.BPODHandles.compute_adj_proj_coeffs
, :pydmd.DMDHandles.compute_proj_coeffs
.
Bug fixes
- Fixed minor bug in the function
util.impulse
. - Fixed minor bug in
testvectorspace.py
- Fixed minor bugs in loading/saving test files, some related to delimiters.
- Fixed bug in
testutil
whereeig_biorthog
was assuming the wrong number of return values. - Fixed minor bugs in DMD tests related to casting of matrices/arrays.
Interface changes
- Changed the returned values in :py
dmd.compute_DMD_matrices_snaps_method
, :pydmd.compute_DMD_matrices_direct_method
, :pydmd.DMDHandles.compute_decomp
. - Changed the order of the returned values in :py
pod.PODHandles.compute_decomp
. :pybpod.BPODHandles.compute_decomp
. - Changed the order of the arguments in :py
pod.PODHandles.get_decomp
, :pypod.PODHandles.put_decomp
, :pybpod.BPODHandles.get_decomp
, :pybpod.BPODHandles.put_decomp
, and :pyera.ERA.put_decomp
. - Changed the arguments to :py
dmd.DMDHandles.get_decomp
and :pydmd.DMDHandles.put_decomp
. - Added the following new methods that compute projections onto modes: :py
pod.PODHandles.compute_proj_coeffs
, :pybpod.BPODHandles.compute_proj_coeffs
, :pybpod.BPODHandles.compute_adj_proj_coeffs
, and :pydmd.DMDHandles.compute_proj_coeffs
. - Added the following new methods that save projection coefficients: :py
pod.PODHandles.put_proj_coeffs
, :pybpod.BPODHandles.put_direct_proj_coeffs
, :pybpod.BPODHandles.put_adjoint_proj_coeffs
, and :pydmd.DMDHandles.put_proj_coeffs
. - Added the following new methods in the updated
DMDHandles
class: :pydmd.DMDHandles.compute_exact_modes
, :pydmd.DMDHandles.compute_spectrum
, :pydmd.DMDHandles.compute_eigendecomp
, :pydmd.DMDHandles.put_R_low_order_eigvecs
, :pydmd.DMDHandles.put_L_low_order_eigvecs
, :pydmd.DMDHandles.put_correlation_mat_eigvals
, :pydmd.DMDHandles.put_correlation_mat_eigvecs
, :pydmd.DMDHandles.put_cross_correlation_mat
, and :pydmd.DMDHandles.put_spectral_coeffs
. - :py
dmd.DMDHandles.compute_proj_modes
replaces :pydmd.DMDHandles.compute_modes
. - :py
dmd.DMDHandles.put_eigvals
replaces :pydmd.DMDHandles.put_ritz_vals
. - :py
dmd.DMDHandles.put_build_coeffs
and :pydmd.DMDHandles.put_mode_norms
are now deprecated. - Optional
atol
andrtol
arguments were added to :pypod.PODHandles.compute_decomp
, :pybpod.BPODHandles.compute_decomp
, :pydmd.DMDHandles.compute_decomp
. - Optional
max_num_eigvals
argument added to :pydmd.DMDHandles.compute_decomp
. util.svd
,util.eigh
, andutil.eig_biorthog
now consistently return numpy matrices. Previously, the SVD method returned matrices but the eigendecompositions returned arrays.
Internal changes
- In DMD, the build coefficients are no longer considered part of the decomposition and are no longer saved as internal attributes. Instead, its constituent parts define the decomposition (and are saved as internal attributes). Thus computation of the build coefficients in DMD has been moved from the
compute_decomp
method to thecompute_exact_modes
andcompute_proj_modes
methods, respectively, which makes more sense mathematically. - Added :py
util.eig_biorthog
method to compute both left and right eigenvectors of a matrix, scaled to yield a biorthogonal set. - Added optional
atol
andrtol
arguments to :pyutil.svd
and :pyutil.eigh
. - Updated tests for
util.svd
andutil.eigh
. Properties of the decompositions are now checked, rather than simply duplicating the computations using built-in numpy methods. This allows for better testing of truncated decompositions. Truncation levels are determined during testing, to ensure that truncation actually occurs and is tested. - Updated tests for
util.biorthog
to reduce number of failures. Some failures are to be expected due to the fact that we test on random data, but these are much less frequent now. - Changed how positive definite matrices are generated for use as inner product weight matrices. Previous implementation led to failed tests.
- Changed default delimiter when loading test arrays to
None
. - Improved type checking to allow for any iterable container, not just lists.
- Removed dependencies on
util.make_list
where possible. - Removed some duplicate code in
util
module, whereeig_biorthog
had been implemented twice. - The packaging has been improved.
- Ported to python >= 3.3 using python-future.
- Replaced instances of
xrange
withrange
for compatability with Python3. (In Python 3,
xrange
has been renamed asrange
.) This is not as efficient in Python 2, but only occurs in a few places and with small enough loops that the impact should be negligible. - Added a few more checks for
None
values, as Python 3 doesn't allow comparisons of floats toNone
.
We increased the speed of the BPOD implementations.
New features and improvements
- None
Bug fixes
- None
Interface changes
- None
Internal changes
- BPOD classes now compute fewer inner products. The number of inner products is now the sum of the number of direct vectors and the number of adjoint vectors, whereas previously it was the product. This is achieved by taking advantage of a property of the adjoint.
Small changes mostly related to examples.
New features and improvements
- None
Bug fixes
- Changed a tutorial example.
Interface changes
- None
Internal changes
- None
Many interface changes including new classes and functions for different sized data.
New features and improvements
- New functions and classes for data that fits entirely on one node's memory. These are :py
pod.compute_POD_matrices_snaps_method
, :pypod.compute_POD_matrices_direct_method
, :pybpod.compute_BPOD_matrices
, :pydmd.compute_DMD_matrices_snaps_method
, :pydmd.compute_DMD_matrices_direct_method
, :pyltigalerkinproj.LTIGalerkinProjectionMatrices
, and :pyvectorspace.VectorSpaceMatrices
. These replace thein_memory
member functions and improve computational efficiency for small data. - Added balanced truncation :py
util.balanced_truncation
.
Bug fixes
- None
Interface changes
- The old classes
POD
,BPOD
,DMD
, are now only for large data and have their names appended with "Handles
". - Old classes
LTIGalerkinProjection
, andVectorSpace
have been split into two, and names appended with "Matrices
" and "Handles
". - All
in_memory
member functions have been removed, replaced by the functions and classes above. - Removed the
index_from
optional argument incompute_modes
functions. Mode numbers are now always indexed from zero and are renamed mode indices. - The
VectorSpace
member functioncompute_modes
has been removed and its functionality moved tolin_combine
. LTIGalerkinProjection
member functioncompute_model
uses the result of an operator on a vector, rather than the operator itself. See :pyltigalerkinproj.LTIGalerkinProjectionHandles.compute_model
. The operator classes have been removed.
Internal changes
- OKID now uses least squares instead of a pseudo-inverse for improved numerical stability.
- Added :py
util.InnerProductBlock
for testing.
The main change is a bug fix in :pyutil.lsim
.
New features and improvements
None
Bug fixes
- Function :py
util.lsim
, which is only provided for the user's convenience, is simplified and corrected.
Interface changes
- :py
util.lsim
.
Internal changes
None
The main change is a bug fix in the numpy.eigh
wrapper, :pyutil.eigh
.
New features and improvements
None
Bug fixes
- The POD and DMD classes now use :py
util.eigh
with theis_positive_definite
flag set toTrue
. This eliminates the possibility of small negative eigenvalues that sometimes appear due to numerical precision which led to errors.
Interface changes
None
Internal changes
- Function :py
util.eigh
now has a flag for positive definite matrices. WhenTrue
, the function will automatically adjust the tolerance such that only positive eigenvalues are returned.
New features and improvements
- New class :py
ltigalerkinproj.LTIGalerkinProjection
for LTI Galerkin projections. Replaces and generalizes old classBPODLTIROM
. - Improved print messages to print every 10 seconds and be more informative.
Bug fixes
- Corrected small error in symmetric inner product matrix calculation (used by POD and DMD) where some very small matrix entries were double the true value.
- Fixed race condition in :py
vectorspace.VectorSpace.lin_combine
by adding a barrier.
Interface changes
- Removed class
BPODLTIROM
. - Changed order of indices in Markov parameters returned by :py
okid.OKID
. - Changed all uses of
hankel
toHankel
to be consistent with naming convention.
Internal changes
- Added :py
parallel.Parallel.call_and_bcast
method toParallel
class. - Changed interface of :py
helper.add_to_path
. - :py
dmd.DMD
no longer uses an instance of :pypod.POD
. - The equals operator of vector handles now better deals with vectors which are numpy array objects.
No noteworthy changes from v0.2.0, figuring out pypi website.
First publicly available version.