modusa 0.3.27__tar.gz → 0.3.29__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.27 → modusa-0.3.29}/PKG-INFO +1 -1
- {modusa-0.3.27 → modusa-0.3.29}/pyproject.toml +1 -1
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/plotter.py +88 -44
- {modusa-0.3.27 → modusa-0.3.29}/LICENSE.md +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/README.md +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/.DS_Store +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/config.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/decorators.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/generate_docs_source.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/generate_template.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/list_authors.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/list_plugins.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/main.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/templates/generator.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/templates/io.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/templates/model.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/templates/plugin.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/templates/test.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/devtools/templates/tool.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/audio.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/audio_waveforms.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/base.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/ftds.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/s1d.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/s2d.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/s_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/t_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/generators/tds.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/__pycache__/signal1D.cpython-312.pyc.4443461152 +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/audio.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/base.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/data.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/ftds.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/s1d.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/s2d.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/s_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/t_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/models/tds.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/plugins/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/plugins/base.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/ann_loader.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/audio_converter.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/audio_loader.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/audio_player.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/base.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/math_ops.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/tools/youtube_downloader.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/.DS_Store +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/config.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/excp.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/logger.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/np_func_cat.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/src/modusa/utils/plot.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/__init__.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/data/song1.mp3 +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/data/song1.wav +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/audio_waveform.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_audio.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_ftds.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_s1d.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_s2d.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_s_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_signal_generator.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_t_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_generators/test_tds.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_io/audio_player.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_io/plotter.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_models/test_data.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_models/test_t_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_plugins/youtube_audio_loader.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/frequency_domain_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/spectrogram.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_axis.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_feature_time_domain_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_frequency_time_domain_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_signal1D.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_signal2D.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_time_domain_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_u_ax.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/test_window_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_signals/time_domain_signal.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_tools/test_audio_converter.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_tools/test_fourier_tranform.py +0 -0
- {modusa-0.3.27 → modusa-0.3.29}/tests/test_tools/test_math_ops.py +0 -0
| @@ -7,8 +7,27 @@ import matplotlib.gridspec as gridspec | |
| 7 7 | 
             
            from matplotlib.patches import Rectangle
         | 
| 8 8 | 
             
            from mpl_toolkits.axes_grid1.inset_locator import inset_axes
         | 
| 9 9 |  | 
| 10 | 
            +
            # Helper for 2D plot
         | 
| 11 | 
            +
            def _calculate_extent(x, y):
         | 
| 12 | 
            +
            	# Handle spacing safely
         | 
| 13 | 
            +
            	if len(x) > 1:
         | 
| 14 | 
            +
            		dx = x[1] - x[0]
         | 
| 15 | 
            +
            	else:
         | 
| 16 | 
            +
            		dx = 1  # Default spacing for single value
         | 
| 17 | 
            +
            	if len(y) > 1:
         | 
| 18 | 
            +
            		dy = y[1] - y[0]
         | 
| 19 | 
            +
            	else:
         | 
| 20 | 
            +
            		dy = 1  # Default spacing for single value
         | 
| 21 | 
            +
            		
         | 
| 22 | 
            +
            	return [
         | 
| 23 | 
            +
            		x[0] - dx / 2,
         | 
| 24 | 
            +
            		x[-1] + dx / 2,
         | 
| 25 | 
            +
            		y[0] - dy / 2,
         | 
| 26 | 
            +
            		y[-1] + dy / 2
         | 
| 27 | 
            +
            	]
         | 
| 28 | 
            +
             | 
| 10 29 | 
             
            #======== 1D ===========
         | 
| 11 | 
            -
            def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylabel=None, title=None, legend=None):
         | 
| 30 | 
            +
            def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylabel=None, title=None, legend=None, show_grid=False):
         | 
| 12 31 | 
             
            		"""
         | 
| 13 32 | 
             
            		Plots a 1D signal using matplotlib.
         | 
| 14 33 |  | 
| @@ -53,6 +72,9 @@ def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylab | |
| 53 72 | 
             
            		legend : list[str] | None
         | 
| 54 73 | 
             
            			- List of legend labels corresponding to each signal if plotting multiple lines.
         | 
| 55 74 | 
             
            			- Default: None
         | 
| 75 | 
            +
            		show_grid: bool
         | 
| 76 | 
            +
            			- If you want to show the grid.
         | 
| 77 | 
            +
            			- Default: False
         | 
| 56 78 |  | 
| 57 79 | 
             
            		Returns
         | 
| 58 80 | 
             
            		-------
         | 
| @@ -63,6 +85,7 @@ def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylab | |
| 63 85 | 
             
            		for arg in args:
         | 
| 64 86 | 
             
            			if len(arg) not in [1, 2]: # 1 if it just provides values, 2 if it provided axis as well
         | 
| 65 87 | 
             
            				raise ValueError(f"1D signal needs to have max 2 arrays (y, x) or simply (y, )")
         | 
| 88 | 
            +
            			
         | 
| 66 89 | 
             
            		if isinstance(legend, str): legend = (legend, )
         | 
| 67 90 |  | 
| 68 91 | 
             
            		if legend is not None:
         | 
| @@ -89,10 +112,11 @@ def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylab | |
| 89 112 | 
             
            		for i, signal in enumerate(args):
         | 
| 90 113 | 
             
            			if len(signal) == 1:
         | 
| 91 114 | 
             
            				y = signal[0]
         | 
| 115 | 
            +
            				x = np.arange(y.size)
         | 
| 92 116 | 
             
            				if legend is not None:
         | 
| 93 | 
            -
            					signal_ax.plot(y, label=legend[i])
         | 
| 117 | 
            +
            					signal_ax.plot(x, y, label=legend[i])
         | 
| 94 118 | 
             
            				else:
         | 
| 95 | 
            -
            					signal_ax.plot(y)
         | 
| 119 | 
            +
            					signal_ax.plot(x, y)
         | 
| 96 120 | 
             
            			elif len(signal) == 2:
         | 
| 97 121 | 
             
            				y, x = signal[0], signal[1]
         | 
| 98 122 | 
             
            				if legend is not None:
         | 
| @@ -102,14 +126,19 @@ def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylab | |
| 102 126 |  | 
| 103 127 | 
             
            		# Add annotations
         | 
| 104 128 | 
             
            		if ann is not None:
         | 
| 105 | 
            -
            			annotation_ax.set_ylim(0, 1)
         | 
| 129 | 
            +
            			annotation_ax.set_ylim(0, 1) # For consistent layout
         | 
| 130 | 
            +
            			# Determine visible x-range
         | 
| 131 | 
            +
            			x_view_min = xlim[0] if xlim is not None else np.min(x)
         | 
| 132 | 
            +
            			x_view_max = xlim[1] if xlim is not None else np.max(x)
         | 
| 133 | 
            +
            			
         | 
| 106 134 | 
             
            			for i, (start, end, tag) in enumerate(ann):
         | 
| 107 | 
            -
            				 | 
| 108 | 
            -
             | 
| 109 | 
            -
             | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 112 | 
            -
             | 
| 135 | 
            +
            				# We make sure that we only plot annotation that are within the x range of the current view
         | 
| 136 | 
            +
            				if start >= x_view_max or end <= x_view_min:
         | 
| 137 | 
            +
            					continue
         | 
| 138 | 
            +
            				
         | 
| 139 | 
            +
            				# Clip boundaries to xlim
         | 
| 140 | 
            +
            				start = max(start, x_view_min)
         | 
| 141 | 
            +
            				end = min(end, x_view_max)
         | 
| 113 142 |  | 
| 114 143 | 
             
            				color = colors[i % len(colors)]
         | 
| 115 144 | 
             
            				width = end - start
         | 
| @@ -146,6 +175,10 @@ def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylab | |
| 146 175 | 
             
            			signal_ax.set_xlabel(xlabel)
         | 
| 147 176 | 
             
            		if ylabel is not None:
         | 
| 148 177 | 
             
            			signal_ax.set_ylabel(ylabel)
         | 
| 178 | 
            +
            			
         | 
| 179 | 
            +
            		# Add grid to the plot
         | 
| 180 | 
            +
            		if show_grid is True:
         | 
| 181 | 
            +
            			signal_ax.grid(True, linestyle=':', linewidth=0.7, color='gray', alpha=0.7)
         | 
| 149 182 |  | 
| 150 183 | 
             
            		# Remove the boundaries and ticks from an axis
         | 
| 151 184 | 
             
            		if ann is not None:
         | 
| @@ -159,7 +192,7 @@ def plot1d(*args, ann=None, events=None, xlim=None, ylim=None, xlabel=None, ylab | |
| 159 192 | 
             
            		return fig
         | 
| 160 193 |  | 
| 161 194 | 
             
            #======== 2D ===========
         | 
| 162 | 
            -
            def plot2d(*args, ann=None, events=None, xlim=None, ylim=None, origin="lower", Mlabel=None, xlabel=None, ylabel=None, title=None, legend=None, lm=False):
         | 
| 195 | 
            +
            def plot2d(*args, ann=None, events=None, xlim=None, ylim=None, origin="lower", Mlabel=None, xlabel=None, ylabel=None, title=None, legend=None, lm=False, show_grid=False):
         | 
| 163 196 | 
             
            	"""
         | 
| 164 197 | 
             
            	Plots a 2D matrix (e.g., spectrogram or heatmap) with optional annotations and events.
         | 
| 165 198 |  | 
| @@ -213,6 +246,9 @@ def plot2d(*args, ann=None, events=None, xlim=None, ylim=None, origin="lower", M | |
| 213 246 | 
             
            		- Adds a circular marker for the line.
         | 
| 214 247 | 
             
            		- Default: False
         | 
| 215 248 | 
             
            		- Useful to show the data points.
         | 
| 249 | 
            +
            	show_grid: bool
         | 
| 250 | 
            +
            		- If you want to show the grid.
         | 
| 251 | 
            +
            		- Default: False
         | 
| 216 252 |  | 
| 217 253 | 
             
            	Returns
         | 
| 218 254 | 
             
            	-------
         | 
| @@ -276,28 +312,29 @@ def plot2d(*args, ann=None, events=None, xlim=None, ylim=None, origin="lower", M | |
| 276 312 | 
             
            			if len(signal) == 1: # It means that the axes were not passed
         | 
| 277 313 | 
             
            				y = np.arange(M.shape[0])
         | 
| 278 314 | 
             
            				x = np.arange(M.shape[1])
         | 
| 279 | 
            -
            				 | 
| 280 | 
            -
            				dy = y[1] - y[0]
         | 
| 281 | 
            -
            				extent=[x[0] - dx/2, x[-1] + dx/2, y[0] - dy/2, y[-1] + dy/2]
         | 
| 315 | 
            +
            				extent = _calculate_extent(x, y)
         | 
| 282 316 | 
             
            				im = signal_ax.imshow(M, aspect="auto", origin=origin, cmap="gray_r", extent=extent)
         | 
| 283 317 |  | 
| 284 318 | 
             
            			elif len(signal) == 3: # It means that the axes were passed
         | 
| 285 319 | 
             
            				M, y, x = signal[0], signal[1], signal[2]
         | 
| 286 | 
            -
            				 | 
| 287 | 
            -
            				dy = y[1] - y[0]
         | 
| 288 | 
            -
            				extent=[x[0] - dx/2, x[-1] + dx/2, y[0] - dy/2, y[-1] + dy/2]
         | 
| 320 | 
            +
            				extent = _calculate_extent(x, y)
         | 
| 289 321 | 
             
            				im = signal_ax.imshow(M, aspect="auto", origin=origin, cmap="gray_r", extent=extent)
         | 
| 290 322 |  | 
| 291 323 | 
             
            	# Add annotations
         | 
| 292 324 | 
             
            	if ann is not None:
         | 
| 293 | 
            -
            		annotation_ax.set_ylim(0, 1)
         | 
| 325 | 
            +
            		annotation_ax.set_ylim(0, 1) # For consistent layout
         | 
| 326 | 
            +
            		# Determine visible x-range
         | 
| 327 | 
            +
            		x_view_min = xlim[0] if xlim is not None else np.min(x)
         | 
| 328 | 
            +
            		x_view_max = xlim[1] if xlim is not None else np.max(x)
         | 
| 329 | 
            +
            		
         | 
| 294 330 | 
             
            		for i, (start, end, tag) in enumerate(ann):
         | 
| 295 | 
            -
            			 | 
| 296 | 
            -
             | 
| 297 | 
            -
             | 
| 298 | 
            -
             | 
| 299 | 
            -
             | 
| 300 | 
            -
             | 
| 331 | 
            +
            			# We make sure that we only plot annotation that are within the x range of the current view
         | 
| 332 | 
            +
            			if start >= x_view_max or end <= x_view_min:
         | 
| 333 | 
            +
            				continue
         | 
| 334 | 
            +
            			
         | 
| 335 | 
            +
            			# Clip boundaries to xlim
         | 
| 336 | 
            +
            			start = max(start, x_view_min)
         | 
| 337 | 
            +
            			end = min(end, x_view_max)
         | 
| 301 338 |  | 
| 302 339 | 
             
            			color = colors[i % len(colors)]
         | 
| 303 340 | 
             
            			width = end - start
         | 
| @@ -352,7 +389,10 @@ def plot2d(*args, ann=None, events=None, xlim=None, ylim=None, origin="lower", M | |
| 352 389 | 
             
            		signal_ax.set_xlabel(xlabel)
         | 
| 353 390 | 
             
            	if ylabel is not None:
         | 
| 354 391 | 
             
            		signal_ax.set_ylabel(ylabel)
         | 
| 355 | 
            -
             | 
| 392 | 
            +
            		
         | 
| 393 | 
            +
            	# Add grid to the plot
         | 
| 394 | 
            +
            	if show_grid is True:
         | 
| 395 | 
            +
            		signal_ax.grid(True, linestyle=':', linewidth=0.7, color='gray', alpha=0.7)
         | 
| 356 396 |  | 
| 357 397 | 
             
            	# Making annotation axis spines thicker
         | 
| 358 398 | 
             
            	if ann is not None:
         | 
| @@ -451,36 +491,40 @@ def plot_dist(*args, ann=None, xlim=None, ylim=None, ylabel=None, xlabel=None, t | |
| 451 491 | 
             
            				kde = gaussian_kde(data)
         | 
| 452 492 |  | 
| 453 493 | 
             
            				# Create points to evaluate KDE
         | 
| 454 | 
            -
            				 | 
| 455 | 
            -
            				 | 
| 494 | 
            +
            				x = np.linspace(min(data), max(data), npoints)
         | 
| 495 | 
            +
            				y = kde(x)
         | 
| 456 496 |  | 
| 457 497 | 
             
            				if legend is not None:
         | 
| 458 | 
            -
            						dist_ax.plot( | 
| 498 | 
            +
            						dist_ax.plot(x, y, color=colors[i], label=legend[i])
         | 
| 459 499 | 
             
            						if show_hist is True:
         | 
| 460 500 | 
             
            								dist_ax.hist(data, bins=bins, density=True, alpha=0.3, facecolor=colors[i], edgecolor='black', label=legend[i])
         | 
| 461 501 | 
             
            				else:
         | 
| 462 | 
            -
            						dist_ax.plot( | 
| 502 | 
            +
            						dist_ax.plot(x, y, color=colors[i])
         | 
| 463 503 | 
             
            						if show_hist is True:
         | 
| 464 504 | 
             
            								dist_ax.hist(data, bins=bins, density=True, alpha=0.3, facecolor=colors[i], edgecolor='black')
         | 
| 465 505 |  | 
| 466 506 | 
             
            		# Add annotations
         | 
| 467 507 | 
             
            		if ann is not None:
         | 
| 468 | 
            -
             | 
| 469 | 
            -
             | 
| 470 | 
            -
             | 
| 471 | 
            -
             | 
| 472 | 
            -
             | 
| 473 | 
            -
             | 
| 474 | 
            -
             | 
| 475 | 
            -
             | 
| 476 | 
            -
             | 
| 477 | 
            -
             | 
| 478 | 
            -
             | 
| 479 | 
            -
             | 
| 480 | 
            -
            						annotation_ax.add_patch(rect)
         | 
| 508 | 
            +
            			annotation_ax.set_ylim(0, 1) # For consistent layout
         | 
| 509 | 
            +
            			# Determine visible x-range
         | 
| 510 | 
            +
            			x_view_min = xlim[0] if xlim is not None else np.min(x)
         | 
| 511 | 
            +
            			x_view_max = xlim[1] if xlim is not None else np.max(x)
         | 
| 512 | 
            +
            			for i, (start, end, tag) in enumerate(ann):
         | 
| 513 | 
            +
            				# We make sure that we only plot annotation that are within the x range of the current view
         | 
| 514 | 
            +
            				if start >= x_view_max or end <= x_view_min:
         | 
| 515 | 
            +
            					continue
         | 
| 516 | 
            +
            				
         | 
| 517 | 
            +
            				# Clip boundaries to xlim
         | 
| 518 | 
            +
            				start = max(start, x_view_min)
         | 
| 519 | 
            +
            				end = min(end, x_view_max)
         | 
| 481 520 |  | 
| 482 | 
            -
             | 
| 483 | 
            -
             | 
| 521 | 
            +
            				color = colors[i % len(colors)]
         | 
| 522 | 
            +
            				width = end - start
         | 
| 523 | 
            +
            				rect = Rectangle((start, 0), width, 1, color=color, alpha=0.7)
         | 
| 524 | 
            +
            				annotation_ax.add_patch(rect)
         | 
| 525 | 
            +
            			
         | 
| 526 | 
            +
            				text_obj = annotation_ax.text((start + end) / 2, 0.5, tag, ha='center', va='center', fontsize=10, color='white', fontweight='bold', zorder=10, clip_on=True)
         | 
| 527 | 
            +
            				text_obj.set_clip_path(rect)
         | 
| 484 528 |  | 
| 485 529 | 
             
            		# Add legend
         | 
| 486 530 | 
             
            		if legend is not None:
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            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.27 → modusa-0.3.29}/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
         |