searchf works and debug mode

This commit is contained in:
weygoldt
2023-01-23 20:27:16 +01:00
parent 6159121d76
commit 87d66dfc2f
4 changed files with 111 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ from scipy.ndimage import gaussian_filter1d
from scipy.stats import gamma, norm
def scale01(data):
def minmaxnorm(data):
"""
Normalize data to [0, 1]
@@ -19,7 +19,7 @@ def scale01(data):
Normalized data.
"""
return (2*((data - np.min(data)) / (np.max(data) - np.min(data)))) - 1
return (data - np.min(data)) / (np.max(data) - np.min(data))
def instantaneous_frequency(
@@ -168,6 +168,9 @@ def group_timestamps(
]
timestamps.sort()
if len(timestamps) == 0:
return []
groups = []
current_group = [timestamps[0]]