modulo-vki 2.0.6__py3-none-any.whl → 2.0.7__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.
- modulo_vki/__init__.py +22 -22
- modulo_vki/core/__init__.py +9 -9
- modulo_vki/core/_dft.py +61 -61
- modulo_vki/core/_dmd_s.py +72 -72
- modulo_vki/core/_k_matrix.py +81 -81
- modulo_vki/core/_mpod_space.py +180 -180
- modulo_vki/core/_mpod_time.py +154 -154
- modulo_vki/core/_pod_space.py +184 -184
- modulo_vki/core/_pod_time.py +48 -48
- modulo_vki/core/_spod_s.py +101 -101
- modulo_vki/core/_spod_t.py +104 -104
- modulo_vki/modulo.py +828 -828
- modulo_vki/utils/__init__.py +4 -4
- modulo_vki/utils/_plots.py +51 -51
- modulo_vki/utils/_utils.py +341 -341
- modulo_vki/utils/others.py +452 -452
- modulo_vki/utils/read_db.py +339 -339
- {modulo_vki-2.0.6.dist-info → modulo_vki-2.0.7.dist-info}/LICENSE +21 -21
- {modulo_vki-2.0.6.dist-info → modulo_vki-2.0.7.dist-info}/METADATA +304 -304
- modulo_vki-2.0.7.dist-info/RECORD +22 -0
- modulo_vki-2.0.6.dist-info/RECORD +0 -22
- {modulo_vki-2.0.6.dist-info → modulo_vki-2.0.7.dist-info}/WHEEL +0 -0
- {modulo_vki-2.0.6.dist-info → modulo_vki-2.0.7.dist-info}/top_level.txt +0 -0
modulo_vki/utils/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from ._utils import *
|
|
2
|
-
from ._plots import *
|
|
3
|
-
from .others import *
|
|
4
|
-
from .read_db import *
|
|
1
|
+
from ._utils import *
|
|
2
|
+
from ._plots import *
|
|
3
|
+
from .others import *
|
|
4
|
+
from .read_db import *
|
modulo_vki/utils/_plots.py
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
import matplotlib.pyplot as plt
|
|
3
|
-
from matplotlib.patches import Rectangle
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def plot_mesh(X, Y, x, y, X_mid, Y_mid):
|
|
7
|
-
"""
|
|
8
|
-
Plot original mesh and rectangular mesh over original mesh
|
|
9
|
-
:param X:
|
|
10
|
-
:param Y:
|
|
11
|
-
:param x:
|
|
12
|
-
:param y:
|
|
13
|
-
:param X_mid:
|
|
14
|
-
:param Y_mid:
|
|
15
|
-
:return:
|
|
16
|
-
"""
|
|
17
|
-
# Plot original mesh
|
|
18
|
-
fig, ax = plt.subplots()
|
|
19
|
-
ax.scatter(X, Y, marker='.', color='k')
|
|
20
|
-
ax.set_title('Original Mesh')
|
|
21
|
-
ax.set_xlabel('x')
|
|
22
|
-
ax.set_ylabel('y')
|
|
23
|
-
|
|
24
|
-
# Plot rectangular mesh over original mesh
|
|
25
|
-
fig, ax = plt.subplots(figsize=(10, 8))
|
|
26
|
-
im = ax.imshow(np.zeros_like(X), cmap='gray', extent=[x.min(), x.max(), y.min(), y.max()], origin='lower')
|
|
27
|
-
ax.scatter(X, Y, marker='.', color='k')
|
|
28
|
-
ax.plot(X_mid, Y_mid, '--k', lw=1)
|
|
29
|
-
ax.plot(X_mid.T, Y_mid.T, '--k', lw=1)
|
|
30
|
-
ax.set_title('Rectangular Mesh over Original Mesh')
|
|
31
|
-
ax.set_xlabel('x')
|
|
32
|
-
ax.set_ylabel('y')
|
|
33
|
-
fig.colorbar(im)
|
|
34
|
-
ax.set(xlim=(-1.2, 1.2), ylim=(0.9, 5.3))
|
|
35
|
-
|
|
36
|
-
return plt.show()
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def plot_areas(X_mid, Y_mid, areas):
|
|
40
|
-
"""
|
|
41
|
-
Plot relative areas of sub-rectangles
|
|
42
|
-
:param X_mid:
|
|
43
|
-
:param Y_mid:
|
|
44
|
-
:param areas:
|
|
45
|
-
:return:
|
|
46
|
-
"""
|
|
47
|
-
fig, ax = plt.subplots()
|
|
48
|
-
ax.pcolormesh(X_mid, Y_mid, areas, cmap='viridis', shading='auto')
|
|
49
|
-
ax.set_xlabel('x')
|
|
50
|
-
ax.set_ylabel('y')
|
|
51
|
-
ax.set_title('Relative areas of sub-rectangles')
|
|
1
|
+
import numpy as np
|
|
2
|
+
import matplotlib.pyplot as plt
|
|
3
|
+
from matplotlib.patches import Rectangle
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def plot_mesh(X, Y, x, y, X_mid, Y_mid):
|
|
7
|
+
"""
|
|
8
|
+
Plot original mesh and rectangular mesh over original mesh
|
|
9
|
+
:param X:
|
|
10
|
+
:param Y:
|
|
11
|
+
:param x:
|
|
12
|
+
:param y:
|
|
13
|
+
:param X_mid:
|
|
14
|
+
:param Y_mid:
|
|
15
|
+
:return:
|
|
16
|
+
"""
|
|
17
|
+
# Plot original mesh
|
|
18
|
+
fig, ax = plt.subplots()
|
|
19
|
+
ax.scatter(X, Y, marker='.', color='k')
|
|
20
|
+
ax.set_title('Original Mesh')
|
|
21
|
+
ax.set_xlabel('x')
|
|
22
|
+
ax.set_ylabel('y')
|
|
23
|
+
|
|
24
|
+
# Plot rectangular mesh over original mesh
|
|
25
|
+
fig, ax = plt.subplots(figsize=(10, 8))
|
|
26
|
+
im = ax.imshow(np.zeros_like(X), cmap='gray', extent=[x.min(), x.max(), y.min(), y.max()], origin='lower')
|
|
27
|
+
ax.scatter(X, Y, marker='.', color='k')
|
|
28
|
+
ax.plot(X_mid, Y_mid, '--k', lw=1)
|
|
29
|
+
ax.plot(X_mid.T, Y_mid.T, '--k', lw=1)
|
|
30
|
+
ax.set_title('Rectangular Mesh over Original Mesh')
|
|
31
|
+
ax.set_xlabel('x')
|
|
32
|
+
ax.set_ylabel('y')
|
|
33
|
+
fig.colorbar(im)
|
|
34
|
+
ax.set(xlim=(-1.2, 1.2), ylim=(0.9, 5.3))
|
|
35
|
+
|
|
36
|
+
return plt.show()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def plot_areas(X_mid, Y_mid, areas):
|
|
40
|
+
"""
|
|
41
|
+
Plot relative areas of sub-rectangles
|
|
42
|
+
:param X_mid:
|
|
43
|
+
:param Y_mid:
|
|
44
|
+
:param areas:
|
|
45
|
+
:return:
|
|
46
|
+
"""
|
|
47
|
+
fig, ax = plt.subplots()
|
|
48
|
+
ax.pcolormesh(X_mid, Y_mid, areas, cmap='viridis', shading='auto')
|
|
49
|
+
ax.set_xlabel('x')
|
|
50
|
+
ax.set_ylabel('y')
|
|
51
|
+
ax.set_title('Relative areas of sub-rectangles')
|
|
52
52
|
return plt.show()
|