modusa 0.3.50__tar.gz → 0.3.52__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.50 → modusa-0.3.52}/PKG-INFO +1 -1
- {modusa-0.3.50 → modusa-0.3.52}/pyproject.toml +1 -1
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/plotter.py +45 -10
- {modusa-0.3.50 → modusa-0.3.52}/LICENSE.md +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/README.md +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/.DS_Store +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/config.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/decorators.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/generate_docs_source.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/generate_template.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/list_authors.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/list_plugins.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/main.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/templates/generator.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/templates/io.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/templates/model.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/templates/plugin.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/templates/test.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/devtools/templates/tool.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/fonts/NotoSansDevanagari-Regular.ttf +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/audio.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/audio_waveforms.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/base.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/ftds.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/s1d.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/s2d.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/s_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/t_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/generators/tds.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/__pycache__/signal1D.cpython-312.pyc.4443461152 +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/audio.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/base.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/data.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/ftds.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/s1d.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/s2d.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/s_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/t_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/models/tds.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/plugins/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/plugins/base.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/_plotter_old.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/ann_loader.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/audio_converter.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/audio_loader.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/audio_player.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/audio_recorder.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/base.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/math_ops.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/tools/youtube_downloader.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/.DS_Store +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/config.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/excp.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/logger.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/np_func_cat.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/src/modusa/utils/plot.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/__init__.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/data/song1.mp3 +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/data/song1.wav +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/audio_waveform.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_audio.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_ftds.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_s1d.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_s2d.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_s_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_signal_generator.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_t_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_generators/test_tds.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_io/audio_player.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_io/plotter.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_models/test_data.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_models/test_t_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_plugins/youtube_audio_loader.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/frequency_domain_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/spectrogram.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_axis.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_feature_time_domain_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_frequency_time_domain_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_signal1D.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_signal2D.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_time_domain_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_u_ax.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/test_window_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_signals/time_domain_signal.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_tools/test_audio_converter.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_tools/test_fourier_tranform.py +0 -0
- {modusa-0.3.50 → modusa-0.3.52}/tests/test_tools/test_math_ops.py +0 -0
|
@@ -915,14 +915,14 @@ class Fig:
|
|
|
915
915
|
|
|
916
916
|
"""
|
|
917
917
|
|
|
918
|
-
def __init__(self, arrangement="asm",
|
|
918
|
+
def __init__(self, arrangement="asm", xlim=None):
|
|
919
919
|
|
|
920
920
|
self._xlim = xlim
|
|
921
921
|
self._curr_row_idx = 1 # Starting from 1 because row 0 is reserved for reference subplot
|
|
922
922
|
self._curr_color_idx = 0 # So that we have different color across all the subplots to avoid legend confusion
|
|
923
923
|
|
|
924
924
|
# Subplot setup
|
|
925
|
-
self._fig, self._axs = self._generate_subplots(arrangement
|
|
925
|
+
self._fig, self._axs = self._generate_subplots(arrangement) # This will fill in the all the above variables
|
|
926
926
|
|
|
927
927
|
|
|
928
928
|
def _get_curr_row(self):
|
|
@@ -958,7 +958,7 @@ class Fig:
|
|
|
958
958
|
return [x[0] - dx / 2, x[-1] + dx / 2, y[0] - dy / 2, y[-1] + dy / 2]
|
|
959
959
|
|
|
960
960
|
|
|
961
|
-
def _generate_subplots(self, arrangement
|
|
961
|
+
def _generate_subplots(self, arrangement):
|
|
962
962
|
"""
|
|
963
963
|
Generate subplots based on the configuration.
|
|
964
964
|
"""
|
|
@@ -1013,12 +1013,6 @@ class Fig:
|
|
|
1013
1013
|
# xlim should be applied on reference subplot, rest all subplots will automatically adjust
|
|
1014
1014
|
if xlim is not None:
|
|
1015
1015
|
axs[0, 0].set_xlim(xlim)
|
|
1016
|
-
|
|
1017
|
-
# Set title and label
|
|
1018
|
-
if title is not None:
|
|
1019
|
-
axs[0, 0].set_title(title)
|
|
1020
|
-
if xlabel is not None:
|
|
1021
|
-
axs[-1, 0].set_xlabel(xlabel)
|
|
1022
1016
|
|
|
1023
1017
|
fig.subplots_adjust(hspace=0.2, wspace=0.05)
|
|
1024
1018
|
|
|
@@ -1283,7 +1277,48 @@ class Fig:
|
|
|
1283
1277
|
all_labels.extend(labels)
|
|
1284
1278
|
|
|
1285
1279
|
# remove duplicates if needed
|
|
1286
|
-
fig.legend(all_handles, all_labels, loc='upper right', bbox_to_anchor=(0.95, ypos), ncol=
|
|
1280
|
+
fig.legend(all_handles, all_labels, loc='upper right', bbox_to_anchor=(0.95, ypos), ncol=3, frameon=True, bbox_transform=fig.transFigure)
|
|
1281
|
+
|
|
1282
|
+
def add_title(self, title=None, s=13):
|
|
1283
|
+
"""
|
|
1284
|
+
Add title to the figure.
|
|
1285
|
+
|
|
1286
|
+
Parameters
|
|
1287
|
+
----------
|
|
1288
|
+
title: str | None
|
|
1289
|
+
- Title of the figure.
|
|
1290
|
+
- Default: None
|
|
1291
|
+
s: Number
|
|
1292
|
+
- Font size.
|
|
1293
|
+
- Default: None
|
|
1294
|
+
"""
|
|
1295
|
+
axs = self._axs
|
|
1296
|
+
ref_ax = axs[0, 0] # Title is added to the top subplot (ref subplot)
|
|
1297
|
+
|
|
1298
|
+
if title is not None:
|
|
1299
|
+
ref_ax.set_title(title, pad=10, size=s)
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
def add_xlabel(self, xlabel=None, s=None):
|
|
1303
|
+
"""
|
|
1304
|
+
Add shared x-label to the figure.
|
|
1305
|
+
|
|
1306
|
+
Parameters
|
|
1307
|
+
----------
|
|
1308
|
+
xlabel: str | None
|
|
1309
|
+
- xlabel for the figure.
|
|
1310
|
+
- Default: None
|
|
1311
|
+
s: Number
|
|
1312
|
+
- Font size.
|
|
1313
|
+
- Default: None
|
|
1314
|
+
"""
|
|
1315
|
+
axs = self._axs
|
|
1316
|
+
ref_ax = axs[-1, 0] # X-label is added to the last subplot
|
|
1317
|
+
if xlabel is not None:
|
|
1318
|
+
ref_ax.set_xlabel(xlabel, size=s)
|
|
1319
|
+
|
|
1320
|
+
def add_xticks():
|
|
1321
|
+
raise NotImplementedError("Please raise a github issue `https://github.com/meluron-toolbox/modusa/issues`")
|
|
1287
1322
|
|
|
1288
1323
|
def save(self, path="./figure.png"):
|
|
1289
1324
|
"""
|
|
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.50 → modusa-0.3.52}/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
|