Skip to content
Snippets Groups Projects
Commit 6bb0fc69 authored by Georges Da Costa's avatar Georges Da Costa
Browse files

Adds watermark detection for constant values

parent 79c20ad3
Branches
Tags
No related merge requests found
...@@ -11,6 +11,7 @@ import matplotlib.pyplot as plt ...@@ -11,6 +11,7 @@ import matplotlib.pyplot as plt
# Tools for watermark detection # Tools for watermark detection
def df_to_vector(df): def df_to_vector(df):
np.seterr(invalid='ignore')
try: try:
tmp = df.drop('#timestamp', axis=1) tmp = df.drop('#timestamp', axis=1)
except: except:
...@@ -74,7 +75,7 @@ def get_shift(dataframe, frequency=10, duration=30, backward=False): ...@@ -74,7 +75,7 @@ def get_shift(dataframe, frequency=10, duration=30, backward=False):
#print(delta, res) #print(delta, res)
if current < .6: if np.isnan(current) or current < .6:
res = pos_in_data, 0 res = pos_in_data, 0
return res return res
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment