modulo-vki 2.1.0__py3-none-any.whl → 2.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modulo_vki
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: MODULO (MODal mULtiscale pOd) is a software developed at the von Karman Institute to perform Multiscale Modal Analysis of numerical and experimental data.
5
5
  Home-page: https://github.com/mendezVKI/MODULO/tree/master/modulo_python_package/
6
6
  Author: ['R. Poletti', 'L. Schena', 'D. Ninni', 'M. A. Mendez']
@@ -10,7 +10,7 @@ Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Natural Language :: English
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
13
+ Description-Content-Type: text/x-rst
14
14
  License-File: LICENSE
15
15
  Requires-Dist: tqdm
16
16
  Requires-Dist: numpy
@@ -33,34 +33,19 @@ Dynamic: requires-dist
33
33
  Dynamic: requires-python
34
34
  Dynamic: summary
35
35
 
36
-
37
-
38
36
  MODULO: a python toolbox for data-driven modal decomposition
39
- -----------------------------------------------------------
40
-
41
- .. image:: https://readthedocs.org/projects/modulo/badge/?version=latest
42
- :target: https://modulo.readthedocs.io/en/latest/?badge=latest
43
- :alt: Documentation Status
44
-
45
- |DOI| |PyPI|
46
-
47
- .. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.13939519.svg
48
- :target: https://doi.org/10.5281/zenodo.13939519
49
-
50
- .. |PyPI| image:: https://img.shields.io/pypi/v/modulo_vki
51
- :target: https://pypi.org/project/modulo_vki/
37
+ ------------------------------------------------------------
52
38
 
53
- .. raw:: html
39
+ .. image:: https://modulo.readthedocs.io/en/latest/_images/modulo_logo.png
40
+ :alt: MODULO logo
41
+ :width: 500px
42
+ :align: center
54
43
 
55
- <div style="text-align: center;">
56
- <img src="https://modulo.readthedocs.io/en/latest/_images/modulo_logo.png" alt="Modulo Logo" width="500"/>
57
- </div>
58
44
 
45
+ **MODULO** is a modal decomposition package developed at the von Karman Institute for Fluid Dynamics (VKI). It offers a wide range of decomposition techniques, allowing users to choose the most appropriate method for their specific problem. MODULO can efficiently handle large datasets natively, thanks to a memory-saving feature that partitions the data and processes the decomposition in chunks (`Nini et al. (2022) <https://www.sciencedirect.com/science/article/pii/S2352711020303356>`_). Moreover, it supports non-uniform meshes through a weighted inner product formulation. Currently, MODULO heavily relies on NumPy routines and does not offer additional parallel computing capabilities beyond those naturally provided by NumPy.
59
46
 
60
- **MODULO** is a modal decomposition package developed at the von Karman Institute for Fluid Dynamics (VKI). It offers a wide range of decomposition techniques, allowing users to choose the most appropriate method for their specific problem. MODULO can efficiently handle large datasets natively, thanks to a memory-saving feature that partitions the data and processes the decomposition in chunks (ninni2020modulo). Moreover, it supports non-uniform meshes through a weighted inner product formulation. Currently, MODULO heavily relies on NumPy routines and does not offer additional parallel computing capabilities beyond those naturally provided by NumPy.
61
-
62
- While the discontinued MATLAB version of MODULO (ninni2020modulo) is accessible in the “Old_Matlab_Implementation” branch,
63
- it is no longer maintained. The latest decomposition techniques are exclusively available in the current Python version.
47
+ While the discontinued MATLAB version of MODULO is accessible in the “Old_Matlab_Implementation” branch,
48
+ it is no longer maintained. The latest decomposition techniques are exclusively available in the current Python version (`Poletti et al. (2024) <https://joss.theoj.org/papers/10.21105/joss.06753>`_).
64
49
 
65
50
  As a part of the MODULO project, we provide a series of lectures on data-driven modal decomposition, and its applications.
66
51
  These are available at the `MODULO YouTube channel <https://www.youtube.com/@modulompod5682>`_.
@@ -70,65 +55,47 @@ These are available at the `MODULO YouTube channel <https://www.youtube.com/@mod
70
55
  Modal decompositions
71
56
  --------------------
72
57
  Modal decompositions aim to describe the data as a linear combination of *modes*, obtained by projecting the data
73
- onto a suitable set of basis. For instance, consider a matrix $D(x, t)$, where $x$ and $t$ are the spatial and temporal
74
- coordinates, respectively, the modal decomposition can be written as:
75
-
76
- $D(x_i, t_k) = \\phi(x_i) \\Sigma \\psi(t_k)^T$
77
-
78
- where $\\phi(x_i)$ is the spatial basis, $\\psi(t_k)$ is the temporal basis, and $\\Sigma$ is the modal coefficients.
79
- Different decompositions employ different bases, such as prescribed Fourier basis ($\\psi_\\mathcal{F}$) for
58
+ onto a suitable set of basis. Different decompositions employ different bases, such as prescribed Fourier basis for
80
59
  the Discrete Fourier Transform (DFT), or data-driven basis, i.e. tailored on the dataset at hand,
81
- for the Proper Orthogonal Decomposition (POD).
82
-
83
- We refer to (mendez2022statistical, mendez2022generalizedmultiscalemodalanalysis, Mendez_2023) for an introduction to the topic.
84
-
60
+ for the Proper Orthogonal Decomposition (POD). We refer to `Mendez (2022) <https://doi.org/10.48550/arXiv.2201.03847>`_, `Mendez (2023) <https://doi.org/10.1017/9781108896214.013>`_, and `Mendez et al. (2023) <https://arxiv.org/abs/2208.07746>`_ for an introduction to the topic.
85
61
  MODULO currently features the following decompositions:
86
62
 
87
- - Discrete Fourier Transform (DFT) (briggs1995dft)
88
- - Proper Orthogonal Decomposition (POD) (sirovich1987turbulence, berkooz1993proper)
89
- - Multi-Scale Proper Orthogonal Decomposition (mPOD) (mendez2019multi)
90
- - Dynamic Mode Decomposition (DMD) (schmid2010dynamic)
91
- - Spectral Proper Orthogonal Decomposition (SPOD) (csieber2016spectral, towne2018spectral),
63
+ - Discrete Fourier Transform (DFT) (`Briggs et al. (1997) <https://epubs.siam.org/doi/book/10.1137/1.9781611971514>`_)
64
+ - Proper Orthogonal Decomposition (POD) (`Sirovich et al. (1987) <https://www.ams.org/journals/qam/1987-45-03/S0033-569X-1987-0910464-1/S0033-569X-1987-0910464-1.pdf>`_ , `Berkooz et al. (1993) <https://doi.org/10.1146/annurev.fl.25.010193.002543>`_)
65
+ - Multi-Scale Proper Orthogonal Decomposition (mPOD) (`Mendez et al. (2019) <https://arxiv.org/abs/1804.09646>`_)
66
+ - Dynamic Mode Decomposition (DMD) (`Schmid (2010) <https://doi.org/10.1017/S0022112010001217>`_)
67
+ - Spectral Proper Orthogonal Decomposition (SPOD) (`Sieber et al. (2016) <https://doi.org/10.48550/arXiv.1508.04642>`_, `Towne et al. (2018) <https://doi.org/10.48550/arXiv.1708.04393>`_),
92
68
  note that the two are different formulations, and both are available in MODULO.
93
- - Kernel Proper Orthogonal Decomposition (KPOD) (mika1998kernel)
69
+ - Kernel Proper Orthogonal Decomposition (KPOD) (`Mika et al. (1998) <https://proceedings.neurips.cc/paper_files/paper/1998/file/226d1f15ecd35f784d2a20c3ecf56d7f-Paper.pdf>`_)
94
70
 
95
71
  We remind the curious reader to the respective references for a detailed description of each decomposition, and to the
96
72
  documentation for a practical guide on how to use them in MODULO.
97
73
 
98
-
99
74
  Release Notes
100
75
  -------------
101
- The latest version of MODULO (v2.0) includes the following updates:
102
-
103
- 1. **Faster EIG/SVD algorithms**, using powerful randomized svd solvers from scikit_learn
104
- (see `here <https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html>`_
105
- and `here <https://scikit-learn.org/stable/modules/generated/sklearn.utils.extmath.randomized_svd.html>`_.)
106
- It is now possible to select various options as "eig_solver" and "svd_solver",
107
- offering different trade-offs in terms of accuracy vs computational time.
108
-
109
- 2. **Computation the POD directly via SVD**, using any of the four "svd_solver" options.
110
- This is generally faster but requires more memory.
76
+ This version of MODULO includes the following updates:
111
77
 
112
- 3. **Faster subscale estimators for the mPOD:** the previous version used the rank of the correlation matrix in each scale to define the number of modes to be computed in each portion of the splitting vector before assembling the full basis. This is computationally very demanding. This estimation has been replaced by a
113
- frequency-based threshold (i.e. based on the frequency bins within each portion) since one can show that the
114
- frequency-based estimator is always more "conservative" than the rank-based estimator.
78
+ 1. **mPOD bug fix:** the previous version of mPOD was skipping the last scale of the frequency splitting vector. Fixed in this version.
115
79
 
116
- 4. **Major improvement on the memory saving option** : the previous version of modulo always required in input the matrix D.
117
- Then, if the memory saving option was active, the matrix was partitioned and stored locally to free the RAM before computing the
118
- correlation matrix (see `this tutorial by D. Ninni <https://www.youtube.com/watch?v=LclxO1WTuao>`_).
119
- In the new version, it is possible to initialize a modulo object *without* the matrix D (see exercise 5 in the examples).
120
- Instead, one can create the partitions without loading the matrix D.
80
+ 2. **SPOD parallelisation:** CSD - SPOD can now be parallelized, leveraging `joblib`. The user needs just to pass the argument `n_processes` for the computation to be
81
+ split between different workers.
82
+
83
+ 3. **Simplified decomposition interface:** the interface of the decomposition methods has been simplified to improve user experience.
121
84
 
122
- 5. **Implementation of Dynamic Mode Decomposition (DMD)** from (Schmid, P.J 2010)
85
+ 4. **Enhanced POD selection:** the POD function has been redesigned, allowing users to easily choose between different POD methods.
86
+
87
+ 5. **Improved computational efficiency:** the code of the decomposition functions has been optimised, resulting in reduced computation time. mPOD now includes two additional optional arguments to enable faster filtering and to avoid recomputing the Sigmas after QR polishing.
88
+
89
+ 6. **Extended documentation:** the documentation has been significantly enriched, now including theoretical foundations for all the supported modal decomposition techniques.
123
90
 
124
- 6. **Implementation of the two Spectral POD formulations**, namely the one from (Sieber et al 2016),
125
- and the one from (Towne et al 2018).
126
-
127
- 7. **Implementation of a kernel version of the POD**, in which the correlation matrix is replaced by a kernel matrix. This is described in Lecture 15 of the course `Hands on Machine Learning for Fluid dynamics 2023 <https://www.vki.ac.be/index.php/events-ls/events/eventdetail/552/-/online-on-site-hands-on-machine-learning-for-fluid-dynamics-2023>`_. We refer also to: `Mendez, 2022 <https://arxiv.org/abs/2208.07746>`_.
128
-
129
- 8. **Implementation of a formulation for non-uniform meshes**, using a weighted matrix for all the relevant inner products. This is currently available only for POD and mPOD but allows for handling data produced from CFD simulation without resampling on a uniform grid (see exercise 4).
130
- It can be used both with and without the memory-saving option.
91
+
92
+ Documentation
93
+ -------------
131
94
 
95
+ The documentation of MODULO is available `here <https://lorenzoschena.github.io/MODULO/intro.html>`_. It
96
+ contains a comprehensive guide on how to install and use the package, as well as a detailed description of the
97
+ decompositions required inputs and outputs. A `list of YouTube videos <https://www.youtube.com/@modulompod5682>`_
98
+ is also available to guide the introduce the user to modal decomposition and MODULO.
132
99
 
133
100
  Installation
134
101
  -------------
@@ -162,14 +129,6 @@ or, if you have pip installed in your environment,
162
129
  $ pip install .
163
130
 
164
131
 
165
- Documentation
166
- -------------
167
-
168
- The documentation of MODULO is available `here <https://modulo.readthedocs.io/en/latest/intro.html>`_. It
169
- contains a comprehensive guide on how to install and use the package, as well as a detailed description of the
170
- decompositions required inputs and outputs. A `list of YouTube videos <https://www.youtube.com/@modulompod5682>`_
171
- is also available to guide the introduce the user to modal decomposition and MODULO.
172
-
173
132
  Example
174
133
  -------------
175
134
 
@@ -242,60 +201,7 @@ you can use the weighted inner product formulation (refer to `examples/ex_05_non
242
201
 
243
202
  # Compute the POD decomposition
244
203
  phi_POD, Sigma_POD, psi_POD = m.POD()
245
-
246
- Computational Cost Estimates
247
- ----------------------------
248
- We here provide a rough estimate of the amoung of RAM required to decompose a test case with and without the memory saving option.
249
- This option reduces the memory usage at the cost of increasing the computational time (see https://www.youtube.com/watch?v=LclxO1WTuao)
250
-
251
- Given a dataset $D \\in \\mathbb{R}^{n_s \\times n_t}$, we consider the computation of $n_r$ modes. When using the memory saving option, we refer to
252
- $n_t' = n_t / n_p$ as the number of time steps in each partition, and to $n_s' = n_s / n_p$ as the number of spatial points in each partition.
253
-
254
- .. list-table::
255
- :header-rows: 1
256
-
257
- * -
258
- - Phase 1: $D$
259
- - Phase 2: $K$
260
- - Phase 3: $\\Psi$
261
- - Phase 4: $\\Phi$
262
- * - No Memory Saving
263
- - $n_s \\times n_t$
264
- - $n_t^2$
265
- - $n_t^2 + n_t \\times n_r$
266
- - $n_s \\times n_t + n_t \\times n_r + n_s \\times n_r$
267
- * - Memory Saving
268
- - /
269
- - $n_s \\times n_t' + n_t' \\times n_t'$
270
- - $n_t^2 + n_t \\times n_r$
271
- - $n_s \\times n_t' + n_s' \\times n_t + n_s \\times n_r$
272
-
273
- If the memory saving option is active, the memory requirements are mostly linked to the storage of the correlation matrix $K$ in Phase 2.
274
- This table can be used to estimate if a dataset is too large for the available RAM, recalling that data in single precision requires 4 bytes (or 32 bits).
275
-
276
- For example, for a dataset with n_s=1 000 000 and n_t = 5000 the following table estimates the RAM required in the two cases, considering n_b=10 partitions in the case of memory saving:
277
-
278
- .. list-table::
279
- :header-rows: 1
280
-
281
- * -
282
- - Phase 1: $D$
283
- - Phase 2: $K$
284
- - Phase 3: $\\Psi$
285
- - Phase 4: $\\Phi$
286
- * - No Memory Saving
287
- - 18.6 GB
288
- - 0.093 GB
289
- - ≈0.112 GB
290
- - ≈22.39 GB
291
- * - Memory Saving
292
- - /
293
- - ≈1.86 GB
294
- - ≈ 0.0026 GB
295
- - ≈ 4.20 GB
296
-
297
-
298
-
204
+
299
205
  Community guidelines
300
206
  ---------------------
301
207
 
@@ -326,31 +232,36 @@ Ask for help
326
232
  If you have troubles using MODULO, or you need help with a specific decomposition, please open an issue on the MODULO GitHub repository.
327
233
 
328
234
  Citation
329
- ---------
330
- If you use MODULO in your research, please cite it as follows:
235
+ --------
331
236
 
332
- ``Poletti, R., Schena, L., Ninni, D. Mendez, M. A. (2024). MODULO: A Python toolbox for data-driven modal decomposition. Journal of Open Source Software, 9(102), 6753, https://doi.org/10.21105/joss.06753
333
-
334
-
335
- .. code-block:: text
336
-
337
- @article{Poletti2024,
338
- doi = {10.21105/joss.06753},
339
- url = {https://doi.org/10.21105/joss.06753},
340
- year = {2024},
341
- publisher = {The Open Journal},
342
- volume = {9},
343
- number = {102},
344
- pages = {6753},
345
- author = {R. Poletti and L. Schena and D. Ninni and M. A. Mendez},
346
- title = {MODULO: A Python toolbox for data-driven modal decomposition},
347
- journal = {Journal of Open Source Software} }
237
+ If you use MODULO in your research, please cite it as follows:
348
238
 
239
+ Poletti, R., Schena, L., Ninni, D., Mendez, M. A. (2024).
240
+ *MODULO: A Python toolbox for data-driven modal decomposition*.
241
+ Journal of Open Source Software, 9(102), 6753. https://doi.org/10.21105/joss.06753
242
+
243
+ .. code-block:: text
244
+
245
+ @article{Poletti2024,
246
+ doi = {10.21105/joss.06753},
247
+ url = {https://doi.org/10.21105/joss.06753},
248
+ year = {2024},
249
+ publisher = {The Open Journal},
250
+ volume = {9},
251
+ number = {102},
252
+ pages = {6753},
253
+ author = {R. Poletti and L. Schena and D. Ninni and M. A. Mendez},
254
+ title = {MODULO: A Python toolbox for data-driven modal decomposition},
255
+ journal = {Journal of Open Source Software}
256
+ }
257
+
349
258
  and
350
259
 
351
- ``Ninni, D., & Mendez, M. A. (2020). MODULO: A software for Multiscale Proper Orthogonal Decomposition of data. SoftwareX, 12, 100622.``
260
+ Ninni, D., & Mendez, M. A. (2020).
261
+ *MODULO: A software for Multiscale Proper Orthogonal Decomposition of data*.
262
+ SoftwareX, 12, 100622. https://doi.org/10.1016/j.softx.2020.100622
352
263
 
353
- .. code-block:: text
264
+ .. code-block:: text
354
265
 
355
266
  @article{ninni2020modulo,
356
267
  title={MODULO: A software for Multiscale Proper Orthogonal Decomposition of data},
@@ -363,7 +274,6 @@ and
363
274
  }
364
275
 
365
276
 
366
-
367
277
  References
368
278
  ----------
369
279
 
@@ -372,6 +282,7 @@ References
372
282
  "Data-Driven Fluid Mechanics: Combining First Principles and Machine Learning". Cambridge University Press, 2023:153-181.
373
283
  https://doi.org/10.1017/9781108896214.013. The pre-print is available at https://arxiv.org/abs/2208.12630.
374
284
  - Ninni, Davide, and Miguel A. Mendez. "MODULO: A software for Multiscale Proper Orthogonal Decomposition of data." SoftwareX 12 (2020): 100622.
285
+ - Poletti, Romain, Schena, Lorenzo, Ninni, David, and Mendez, Miguel A. "Modulo: A python toolbox for data-driven modal decomposition". Journal of Open Source Software (2024), 9(102), 6753.
375
286
  - Mendez, Miguel A. "Linear and nonlinear dimensionality reduction from fluid mechanics to machine learning." Measurement Science and Technology 34.4 (2023): 042001.
376
287
  - Briggs, William L., and Van Emden Henson. The DFT: an owner's manual for the discrete Fourier transform. Society for Industrial and Applied Mathematics, 1995.
377
288
  - Berkooz, Gal, Philip Holmes, and John L. Lumley. "The proper orthogonal decomposition in the analysis of turbulent flows." Annual review of fluid mechanics 25.1 (1993): 539-575.
@@ -395,3 +306,8 @@ There are also decomposition-specific projects, some of which are listed below:
395
306
  - Ichinaga, Andreuzzi, Demo, Tezzele, Lapo, Rozza, Brunton, Kutz. PyDMD: A Python package for robust dynamic mode decomposition. arXiv preprint, 2024.
396
307
  - Rogowski, Marcin, et al. "Unlocking massively parallel spectral proper orthogonal decompositions in the PySPOD package." Computer Physics Communications 302 (2024): 109246.
397
308
 
309
+
310
+
311
+
312
+
313
+
@@ -19,8 +19,8 @@ modulo_vki/utils/_plots.py,sha256=m43t08cVq-TY0BW0YPqT71hN-54hBphIYKZEn8Kw16E,14
19
19
  modulo_vki/utils/_utils.py,sha256=WFD7nwjSzVHpevVwTEvMdjAmcbeqwoXT9M48tIIniJw,14355
20
20
  modulo_vki/utils/others.py,sha256=26ES5EmsLhwkvcXTwNhDMkblGrxoWepX5c9TXeLTRWg,17336
21
21
  modulo_vki/utils/read_db.py,sha256=lJFauxJxS0_mYoxrbn-43UqZjOkr-qb9f6RTUq4IxZU,15149
22
- modulo_vki-2.1.0.dist-info/licenses/LICENSE,sha256=5TivriXFErrYrJgBq3M72kHNHqtSiCft3xESM1zHc0k,1091
23
- modulo_vki-2.1.0.dist-info/METADATA,sha256=DwFf-uEygrIts5jdauD3tnjELaecgAKLsDr4uPO_haM,18201
24
- modulo_vki-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- modulo_vki-2.1.0.dist-info/top_level.txt,sha256=4PA4AmafKU6M7us7gvt_Q976Khx3qjNUEThRRM5zxeA,11
26
- modulo_vki-2.1.0.dist-info/RECORD,,
22
+ modulo_vki-2.1.2.dist-info/licenses/LICENSE,sha256=5TivriXFErrYrJgBq3M72kHNHqtSiCft3xESM1zHc0k,1091
23
+ modulo_vki-2.1.2.dist-info/METADATA,sha256=dCTKzUK0d91uWzg-CoySY5towOn3-ZhExDPXmLF7w-g,14816
24
+ modulo_vki-2.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ modulo_vki-2.1.2.dist-info/top_level.txt,sha256=4PA4AmafKU6M7us7gvt_Q976Khx3qjNUEThRRM5zxeA,11
26
+ modulo_vki-2.1.2.dist-info/RECORD,,