modusa 0.4.13__py3-none-any.whl → 0.4.15__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.
modusa/__init__.py CHANGED
@@ -1,11 +1,11 @@
1
1
  from modusa.utils import excp, config
2
2
 
3
3
  #=====Giving access to plot functions to plot multiple signals.=====
4
- from modusa.tools import dist_plot, hill_plot, fig
4
+ from modusa.tools import dist_plot, hill_plot, plot, fig
5
5
  #=====
6
6
 
7
7
  from modusa.tools import play, convert, record, save
8
8
  from modusa.tools import download
9
9
  from modusa.tools import load, load_ann
10
10
 
11
- __version__ = "0.4.13"
11
+ __version__ = "0.4.15"
modusa/tools/__init__.py CHANGED
@@ -9,4 +9,4 @@ from .ann_loader import load_ann
9
9
  from .audio_recorder import record
10
10
 
11
11
  from .plotter import Fig as fig
12
- from .plotter import dist_plot, hill_plot
12
+ from .plotter import dist_plot, hill_plot, plot
@@ -27,6 +27,7 @@ def load_ann(path, clip=None):
27
27
  - [(start, end, label), ...]
28
28
  """
29
29
  from pathlib import Path
30
+ import warnings
30
31
 
31
32
  if not isinstance(path, (str, Path)):
32
33
  raise ValueError(f"`path` must be one of (str, Path), got {type(path)}")
modusa/tools/plotter.py CHANGED
@@ -1013,6 +1013,43 @@ def dist_plot(*args, ann=None, xlim=None, ylim=None, ylabel=None, xlabel=None, t
1013
1013
  return fig
1014
1014
 
1015
1015
 
1016
+ # ======== Single Plot ===========
1017
+ def plot(*args):
1018
+ """
1019
+ To create 1D/2D plot for immediate
1020
+ inspection.
1021
+
1022
+ Parameters
1023
+ ----------
1024
+ *args: ndarray
1025
+ - Arrays to be plotted.
1026
+ """
1027
+ n = len(args)
1028
+
1029
+ if n < 1:
1030
+ raise ValueError("Need atleast 1 positional argument")
1031
+
1032
+ ## 1D Array
1033
+ if args[0].ndim == 1:
1034
+ if n > 1: # User also passed the xs
1035
+ fig = Fig("s").add_signal(args[0], args[1])
1036
+ else:
1037
+ fig = Fig("s").add_signal(args[0])
1038
+
1039
+ ## 2D Array
1040
+ if args[0].ndim == 2:
1041
+ if n == 1:
1042
+ fig = Fig("m").add_matrix(args[0])
1043
+ elif n == 2: # User also passed the xs
1044
+ fig = Fig("m").add_matrix(args[0], args[1])
1045
+ elif n == 3:
1046
+ fig = Fig("m").add_matrix(args[0], args[1], args[2])
1047
+
1048
+ return fig
1049
+
1050
+
1051
+
1052
+
1016
1053
 
1017
1054
 
1018
1055
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modusa
3
- Version: 0.4.13
3
+ Version: 0.4.15
4
4
  Summary: A modular signal analysis python library.
5
5
  Author-Email: Ankit Anand <ankit0.anand0@gmail.com>
6
6
  License: MIT
@@ -1,8 +1,8 @@
1
- modusa-0.4.13.dist-info/METADATA,sha256=I-DMQGxex48XuGuSc-9LVg4Q10eO8eLN0GLI9Yln-bU,1467
2
- modusa-0.4.13.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- modusa-0.4.13.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
4
- modusa-0.4.13.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
5
- modusa/__init__.py,sha256=OJew7gBTATXtYr813FALjhEni7uV1ksMu2BuYzLLZdc,318
1
+ modusa-0.4.15.dist-info/METADATA,sha256=qelNJCY5rCt2iZqupkgxj9UNbmU7KsCo4eqLsWF_2ro,1467
2
+ modusa-0.4.15.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ modusa-0.4.15.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
4
+ modusa-0.4.15.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
5
+ modusa/__init__.py,sha256=gsKRNB93HfNyg4zhrGRdJew7uSPFAlxp5knuHuj-4s0,324
6
6
  modusa/config.py,sha256=bTqK4t00FZqERVITrxW_q284aDDJAa9aMSfFknfR-oU,280
7
7
  modusa/decorators.py,sha256=8zeNX_wE37O6Vp0ysR4-WCZaEL8mq8dyCF_I5DHOzks,5905
8
8
  modusa/devtools/generate_docs_source.py,sha256=UDflHsk-Yh9-3YJTVBzKL32y8hcxiRgAlFEBTMiDqwM,3301
@@ -39,9 +39,9 @@ modusa/models/t_ax.py,sha256=ZUhvZPUW1TkdZYuUd6Ucm-vsv0JqtZ9yEe3ab67Ma6w,8022
39
39
  modusa/models/tds.py,sha256=FAGfibjyyE_lkEuQp-vSCuqQnopOjmy_IXqUjRlg9kc,11677
40
40
  modusa/plugins/__init__.py,sha256=r1Bf5mnrVKRIwxboutY1iGzDy4EPQhqpk1kSW7iJj_Q,54
41
41
  modusa/plugins/base.py,sha256=Bh_1Bja7fOymFsCgwhXDbV6ys3D8muNrPwrfDrG_G_A,2382
42
- modusa/tools/__init__.py,sha256=q4d7J4xGraVLVLsk4h1OcWvi19FXd7DbJrGdUAOn5Es,336
42
+ modusa/tools/__init__.py,sha256=S7P1uYckyUdkha2UX9uj4P7mqpF6cc5SHqiW6NEupgs,342
43
43
  modusa/tools/_plotter_old.py,sha256=KGow7mihA2H1WNq7s5bpivhCgGo2qVIeDaO6iabpsrg,19294
44
- modusa/tools/ann_loader.py,sha256=EMV6lTm1IeTjvWjvagDgwosux9IV6MZkVdUMzVft9Pc,3017
44
+ modusa/tools/ann_loader.py,sha256=BEdwAh_lccx_SnAO3bNMeY3O5zGiJlH2o4snWmXj8eQ,3034
45
45
  modusa/tools/audio_converter.py,sha256=415qBoPm2sBIuBSI7m1XBKm0AbmVmPydIPPr-uO8D3c,1778
46
46
  modusa/tools/audio_loader.py,sha256=n9Q9t_GmlE8AtioVwRcXX3rnd6PkbGTx-hAoNgUnNOQ,2780
47
47
  modusa/tools/audio_player.py,sha256=pXKaNsDbqhCVbrMx5QRv7aC2IPMJFY5POAG60f-1LmU,2901
@@ -49,7 +49,7 @@ modusa/tools/audio_recorder.py,sha256=K_LGqsPdjTdf3figEZTSQLmgMzYWgz18HTO8C1j5fE
49
49
  modusa/tools/audio_saver.py,sha256=ldzfr_AydsHTnKbxmBLJblN-hLzTmOlppOm306xI4Ug,510
50
50
  modusa/tools/base.py,sha256=C0ESJ0mIfjjRlAkRbSetNtMoOfS6IrHBjexRp3l_Mh4,1293
51
51
  modusa/tools/math_ops.py,sha256=ZZ7U4DgqT7cOeE7_Lzi_Qq-48WYfwR9_osbZwTmE9eg,8690
52
- modusa/tools/plotter.py,sha256=VwHWxQ9t5oP20cHaALMwFsE_fqSUhl_9KDufucTCodw,29964
52
+ modusa/tools/plotter.py,sha256=V0CcRnXkE4tkTZQe6v0LI0ucEagqeudOZ-xoQw2clTc,30667
53
53
  modusa/tools/youtube_downloader.py,sha256=hB_X8-7nOHXOlxg6vv3wyhBLoAsWyomrULP6_uCQL7s,1698
54
54
  modusa/utils/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
55
55
  modusa/utils/config.py,sha256=cuGbqbovx5WDQq5rw3hIKcv3CnE5NttjacSOWnP1yu4,576
@@ -57,4 +57,4 @@ modusa/utils/excp.py,sha256=L9vhaGjKpv9viJYdmC9n5ndmk2GVbUBuFyZyhAQZmWY,906
57
57
  modusa/utils/logger.py,sha256=K0rsnObeNKCxlNeSnVnJeRhgfmob6riB2uyU7h3dDmA,571
58
58
  modusa/utils/np_func_cat.py,sha256=TyIFgRc6bARRMDnZxlVURO5Z0I-GWhxRONYyIv-Vwxs,1007
59
59
  modusa/utils/plot.py,sha256=s_vNdxvKfwxEngvJPgrF1PcmxZNnNaaXPViHWjyjJ-c,5335
60
- modusa-0.4.13.dist-info/RECORD,,
60
+ modusa-0.4.15.dist-info/RECORD,,