modusa 0.3.62__tar.gz → 0.3.64__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.62 → modusa-0.3.64}/PKG-INFO +1 -1
- {modusa-0.3.62 → modusa-0.3.64}/pyproject.toml +1 -1
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/plotter.py +15 -3
- {modusa-0.3.62 → modusa-0.3.64}/LICENSE.md +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/README.md +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/.DS_Store +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/config.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/decorators.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/generate_docs_source.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/generate_template.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/list_authors.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/list_plugins.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/main.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/templates/generator.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/templates/io.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/templates/model.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/templates/plugin.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/templates/test.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/devtools/templates/tool.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/fonts/NotoSansDevanagari-Regular.ttf +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/audio.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/audio_waveforms.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/base.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/ftds.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/s1d.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/s2d.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/s_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/t_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/generators/tds.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/__pycache__/signal1D.cpython-312.pyc.4443461152 +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/audio.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/base.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/data.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/ftds.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/s1d.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/s2d.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/s_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/t_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/models/tds.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/plugins/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/plugins/base.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/_plotter_old.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/ann_loader.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/audio_converter.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/audio_loader.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/audio_player.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/audio_recorder.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/base.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/math_ops.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/tools/youtube_downloader.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/.DS_Store +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/config.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/excp.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/logger.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/np_func_cat.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/src/modusa/utils/plot.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/__init__.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/data/song1.mp3 +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/data/song1.wav +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/audio_waveform.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_audio.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_ftds.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_s1d.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_s2d.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_s_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_signal_generator.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_t_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_generators/test_tds.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_io/audio_player.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_io/plotter.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_models/test_data.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_models/test_t_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_plugins/youtube_audio_loader.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/frequency_domain_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/spectrogram.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_axis.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_feature_time_domain_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_frequency_time_domain_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_signal1D.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_signal2D.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_time_domain_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_u_ax.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/test_window_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_signals/time_domain_signal.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_tools/test_audio_converter.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_tools/test_fourier_tranform.py +0 -0
- {modusa-0.3.62 → modusa-0.3.64}/tests/test_tools/test_math_ops.py +0 -0
|
@@ -325,7 +325,7 @@ class Fig:
|
|
|
325
325
|
else:
|
|
326
326
|
curr_row[0].axvline(x=event, color=c, linestyle=ls, linewidth=lw)
|
|
327
327
|
|
|
328
|
-
def add_annotation(self, ann, label=None, patterns=None, ax=None, ylim=(0, 1)):
|
|
328
|
+
def add_annotation(self, ann, label=None, patterns=None, ax=None, ylim=(0, 1), text_loc="middle"):
|
|
329
329
|
"""
|
|
330
330
|
Add annotation to the figure.
|
|
331
331
|
|
|
@@ -348,6 +348,9 @@ class Fig:
|
|
|
348
348
|
ylim: tuple[number, number]
|
|
349
349
|
- Y-limit for the annotation.
|
|
350
350
|
- Default: (0, 1)
|
|
351
|
+
text_loc: str
|
|
352
|
+
- Location of text relative to the box. (b for bottom, m for middle, t for top)
|
|
353
|
+
- Default: "middle"
|
|
351
354
|
Returns
|
|
352
355
|
-------
|
|
353
356
|
None
|
|
@@ -373,6 +376,14 @@ class Fig:
|
|
|
373
376
|
|
|
374
377
|
colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
|
|
375
378
|
|
|
379
|
+
# Text Location
|
|
380
|
+
if text_loc == "b":
|
|
381
|
+
text_yloc = ylim[0] + 0.1 * (ylim[1] - ylim[0])
|
|
382
|
+
elif text_loc == "t":
|
|
383
|
+
text_yloc = ylim[1] - 0.1 * (ylim[1] - ylim[0])
|
|
384
|
+
else:
|
|
385
|
+
text_yloc = (ylim[1] + ylim[0]) / 2
|
|
386
|
+
|
|
376
387
|
for i, (start, end, tag, group) in enumerate(ann_copy):
|
|
377
388
|
# We make sure that we only plot annotation that are within the x range of the current view
|
|
378
389
|
if xlim is not None:
|
|
@@ -382,6 +393,7 @@ class Fig:
|
|
|
382
393
|
# Clip boundaries to xlim
|
|
383
394
|
start = max(start, xlim[0])
|
|
384
395
|
end = min(end, xlim[1])
|
|
396
|
+
|
|
385
397
|
|
|
386
398
|
if group is not None:
|
|
387
399
|
box_color = colors[group]
|
|
@@ -393,7 +405,7 @@ class Fig:
|
|
|
393
405
|
curr_row[0].add_patch(rect)
|
|
394
406
|
|
|
395
407
|
text_obj = curr_row[0].text(
|
|
396
|
-
(start + end) / 2,
|
|
408
|
+
(start + end) / 2, text_yloc, tag,
|
|
397
409
|
ha='center', va='center',
|
|
398
410
|
fontsize=10, color="black", fontweight='bold', zorder=10, clip_on=True
|
|
399
411
|
)
|
|
@@ -410,7 +422,7 @@ class Fig:
|
|
|
410
422
|
curr_row[0].add_patch(rect)
|
|
411
423
|
|
|
412
424
|
text_obj = curr_row[0].text(
|
|
413
|
-
(start + end) / 2,
|
|
425
|
+
(start + end) / 2, text_yloc, tag,
|
|
414
426
|
ha='center', va='center',
|
|
415
427
|
fontsize=10, color="black", fontweight='bold', zorder=10, clip_on=True
|
|
416
428
|
)
|
|
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.62 → modusa-0.3.64}/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
|