modusa 0.3.73__tar.gz → 0.3.74__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.73 → modusa-0.3.74}/PKG-INFO +1 -1
- {modusa-0.3.73 → modusa-0.3.74}/pyproject.toml +1 -1
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/plotter.py +55 -0
- {modusa-0.3.73 → modusa-0.3.74}/LICENSE.md +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/README.md +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/.DS_Store +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/config.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/decorators.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/generate_docs_source.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/generate_template.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/list_authors.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/list_plugins.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/main.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/templates/generator.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/templates/io.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/templates/model.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/templates/plugin.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/templates/test.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/devtools/templates/tool.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/fonts/NotoSansDevanagari-Regular.ttf +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/audio.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/audio_waveforms.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/base.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/ftds.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/s1d.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/s2d.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/s_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/t_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/generators/tds.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/__pycache__/signal1D.cpython-312.pyc.4443461152 +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/audio.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/base.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/data.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/ftds.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/s1d.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/s2d.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/s_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/t_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/models/tds.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/plugins/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/plugins/base.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/_plotter_old.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/ann_loader.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/audio_converter.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/audio_loader.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/audio_player.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/audio_recorder.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/base.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/math_ops.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/tools/youtube_downloader.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/.DS_Store +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/config.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/excp.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/logger.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/np_func_cat.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/src/modusa/utils/plot.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/__init__.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/data/song1.mp3 +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/data/song1.wav +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/audio_waveform.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_audio.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_ftds.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_s1d.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_s2d.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_s_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_signal_generator.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_t_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_generators/test_tds.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_io/audio_player.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_io/plotter.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_models/test_data.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_models/test_t_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_plugins/youtube_audio_loader.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/frequency_domain_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/spectrogram.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_axis.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_feature_time_domain_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_frequency_time_domain_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_signal1D.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_signal2D.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_time_domain_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_u_ax.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/test_window_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_signals/time_domain_signal.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_tools/test_audio_converter.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_tools/test_fourier_tranform.py +0 -0
- {modusa-0.3.73 → modusa-0.3.74}/tests/test_tools/test_math_ops.py +0 -0
|
@@ -95,6 +95,14 @@ class Fig:
|
|
|
95
95
|
|
|
96
96
|
return curr_row
|
|
97
97
|
|
|
98
|
+
def _get_prev_row(self):
|
|
99
|
+
"""
|
|
100
|
+
Get the prev row where you can add arrows.
|
|
101
|
+
"""
|
|
102
|
+
prev_pow = self._axs[self._curr_row_idx - 1]
|
|
103
|
+
|
|
104
|
+
return prev_pow
|
|
105
|
+
|
|
98
106
|
def _get_new_color(self):
|
|
99
107
|
"""
|
|
100
108
|
Get a new color for different lines.
|
|
@@ -529,6 +537,53 @@ class Fig:
|
|
|
529
537
|
|
|
530
538
|
if grid is True:
|
|
531
539
|
curr_row[0].grid(True, linestyle='--', linewidth=0.7, color="lightgray" ,alpha=0.6)
|
|
540
|
+
|
|
541
|
+
from matplotlib.patches import Rectangle
|
|
542
|
+
import matplotlib.pyplot as plt
|
|
543
|
+
|
|
544
|
+
def add_arrow(self, xy, label, text_offset=(0, 0), c="r", fontsize=12, ax=None):
|
|
545
|
+
"""
|
|
546
|
+
Add an arrow pointing to a specific point with a boxed label at the tail.
|
|
547
|
+
|
|
548
|
+
Parameters
|
|
549
|
+
----------
|
|
550
|
+
xy : tuple[float, float]
|
|
551
|
+
- Target point (x, y) for the arrow head.
|
|
552
|
+
label : str
|
|
553
|
+
- Text label at the arrow tail.
|
|
554
|
+
text_offset : tuple[float, float]
|
|
555
|
+
- Offset (dx, dy) for label position from arrow tail.
|
|
556
|
+
c : str
|
|
557
|
+
- Color for arrow and text.
|
|
558
|
+
- Default: "r" for red
|
|
559
|
+
fontsize : int
|
|
560
|
+
- Font size of the label text.
|
|
561
|
+
- Default: 12
|
|
562
|
+
ax : int | None
|
|
563
|
+
- Which specific axis to plot (1, 2, 3, ...).
|
|
564
|
+
- If None, uses the current row.
|
|
565
|
+
|
|
566
|
+
Returns
|
|
567
|
+
-------
|
|
568
|
+
None
|
|
569
|
+
"""
|
|
570
|
+
curr_row = self._get_prev_row() if ax is None else self._axs[ax]
|
|
571
|
+
|
|
572
|
+
arrowprops = dict(arrowstyle="->", color=c, lw=2)
|
|
573
|
+
bbox = dict(boxstyle="round,pad=0.3", fc="white", ec=c, lw=1.2)
|
|
574
|
+
|
|
575
|
+
text_x, text_y = xy[0] + text_offset[0], xy[1] + text_offset[1]
|
|
576
|
+
|
|
577
|
+
curr_row[0].annotate(
|
|
578
|
+
label,
|
|
579
|
+
xy=xy, xycoords="data",
|
|
580
|
+
xytext=(text_x, text_y), textcoords="data",
|
|
581
|
+
arrowprops=arrowprops,
|
|
582
|
+
fontsize=fontsize,
|
|
583
|
+
color=c,
|
|
584
|
+
ha="center", va="center",
|
|
585
|
+
bbox=bbox
|
|
586
|
+
)
|
|
532
587
|
|
|
533
588
|
def add_legend(self, ypos=1.0):
|
|
534
589
|
"""
|
|
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.73 → modusa-0.3.74}/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
|