modusa 0.3.53__tar.gz → 0.3.56__tar.gz
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.
- {modusa-0.3.53 → modusa-0.3.56}/PKG-INFO +1 -1
- {modusa-0.3.53 → modusa-0.3.56}/pyproject.toml +1 -1
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/plotter.py +26 -7
- {modusa-0.3.53 → modusa-0.3.56}/LICENSE.md +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/README.md +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/.DS_Store +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/config.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/decorators.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/generate_docs_source.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/generate_template.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/list_authors.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/list_plugins.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/main.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/templates/generator.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/templates/io.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/templates/model.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/templates/plugin.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/templates/test.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/devtools/templates/tool.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/fonts/NotoSansDevanagari-Regular.ttf +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/audio.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/audio_waveforms.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/base.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/ftds.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/s1d.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/s2d.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/s_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/t_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/generators/tds.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/__pycache__/signal1D.cpython-312.pyc.4443461152 +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/audio.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/base.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/data.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/ftds.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/s1d.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/s2d.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/s_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/t_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/tds.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/plugins/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/plugins/base.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/_plotter_old.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/ann_loader.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/audio_converter.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/audio_loader.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/audio_player.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/audio_recorder.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/base.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/math_ops.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/tools/youtube_downloader.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/.DS_Store +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/config.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/excp.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/logger.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/np_func_cat.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/src/modusa/utils/plot.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/__init__.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/data/song1.mp3 +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/data/song1.wav +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/audio_waveform.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_audio.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_ftds.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_s1d.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_s2d.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_s_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_signal_generator.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_t_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_generators/test_tds.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_io/audio_player.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_io/plotter.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_models/test_data.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_models/test_t_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_plugins/youtube_audio_loader.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/frequency_domain_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/spectrogram.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_axis.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_feature_time_domain_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_frequency_time_domain_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_signal1D.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_signal2D.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_time_domain_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_u_ax.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/test_window_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_signals/time_domain_signal.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_tools/test_audio_converter.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_tools/test_fourier_tranform.py +0 -0
- {modusa-0.3.53 → modusa-0.3.56}/tests/test_tools/test_math_ops.py +0 -0
|
@@ -72,7 +72,14 @@ class Fig:
|
|
|
72
72
|
|
|
73
73
|
return colors[self._curr_color_idx]
|
|
74
74
|
|
|
75
|
-
def _calculate_extent(self, x, y):
|
|
75
|
+
def _calculate_extent(self, x, y, o):
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
Parameters
|
|
79
|
+
----------
|
|
80
|
+
o: str
|
|
81
|
+
- Origin
|
|
82
|
+
"""
|
|
76
83
|
# Handle spacing safely
|
|
77
84
|
if len(x) > 1:
|
|
78
85
|
dx = x[1] - x[0]
|
|
@@ -83,7 +90,10 @@ class Fig:
|
|
|
83
90
|
else:
|
|
84
91
|
dy = 1 # Default spacing for single value
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
if o == "lower":
|
|
94
|
+
return [x[0] - dx / 2, x[-1] + dx / 2, y[0] - dy / 2, y[-1] + dy / 2]
|
|
95
|
+
else:
|
|
96
|
+
return [x[0] - dx / 2, x[-1] + dx / 2, y[-1] + dy / 2, y[0] - dy / 2]
|
|
87
97
|
|
|
88
98
|
|
|
89
99
|
def _generate_subplots(self, arrangement):
|
|
@@ -203,7 +213,7 @@ class Fig:
|
|
|
203
213
|
|
|
204
214
|
if ylim is not None: curr_row[0].set_ylim(ylim)
|
|
205
215
|
|
|
206
|
-
def add_matrix(self, M, y=None, x=None, c="gray_r", o="
|
|
216
|
+
def add_matrix(self, M, y=None, x=None, c="gray_r", o="upper", label=None, ylabel=None, ylim=None, cbar=True, ax=None):
|
|
207
217
|
"""
|
|
208
218
|
Add matrix to the figure.
|
|
209
219
|
|
|
@@ -248,12 +258,18 @@ class Fig:
|
|
|
248
258
|
|
|
249
259
|
curr_row = self._get_curr_row() if ax is None else self._axs[ax]
|
|
250
260
|
|
|
251
|
-
extent = self._calculate_extent(x, y)
|
|
261
|
+
extent = self._calculate_extent(x, y, o)
|
|
262
|
+
print(extent)
|
|
263
|
+
|
|
252
264
|
im = curr_row[0].imshow(M, aspect="auto", origin=o, cmap=c, extent=extent)
|
|
253
265
|
|
|
254
266
|
if ylabel is not None: curr_row[0].set_ylabel(ylabel)
|
|
255
267
|
|
|
256
|
-
if ylim is not None:
|
|
268
|
+
if ylim is not None:
|
|
269
|
+
if o == "lower":
|
|
270
|
+
curr_row[0].set_ylim(ylim)
|
|
271
|
+
elif o == "upper":
|
|
272
|
+
curr_row[0].set_ylim(ylim[::-1])
|
|
257
273
|
|
|
258
274
|
if cbar is True:
|
|
259
275
|
cbar = plt.colorbar(im, cax=curr_row[1])
|
|
@@ -445,8 +461,11 @@ class Fig:
|
|
|
445
461
|
if xlabel is not None:
|
|
446
462
|
ref_ax.set_xlabel(xlabel, size=s)
|
|
447
463
|
|
|
448
|
-
def add_xticks():
|
|
449
|
-
|
|
464
|
+
def add_xticks(self, xticks=None):
|
|
465
|
+
"""
|
|
466
|
+
Not implemented yet
|
|
467
|
+
"""
|
|
468
|
+
raise NotImplementedError("Please raise a github issue https://github.com/meluron-toolbox/modusa/issues")
|
|
450
469
|
|
|
451
470
|
def save(self, path="./figure.png"):
|
|
452
471
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{modusa-0.3.53 → modusa-0.3.56}/src/modusa/models/__pycache__/signal1D.cpython-312.pyc.4443461152
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|