added gridspec plot layout

This commit is contained in:
weygoldt
2023-01-20 17:09:48 +01:00
parent ddf7bd545a
commit 9f46b969a5
2 changed files with 96 additions and 41 deletions

View File

@@ -3,6 +3,24 @@ from typing import List, Any
from scipy.ndimage import gaussian_filter1d
def norm(data):
"""
Normalize data to [0, 1]
Parameters
----------
data : np.ndarray
Data to normalize.
Returns
-------
np.ndarray
Normalized data.
"""
return (2*((data - np.min(data)) / (np.max(data) - np.min(data)))) - 1
def instantaneous_frequency(
signal: np.ndarray,
samplerate: int,