Commit a2b76f5b authored by Rousseau Vincent's avatar Rousseau Vincent
Browse files

Add mean

parent 231742d5
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
import csv import csv
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from scipy import signal from scipy import signal
import numpy as np
with open('sense_hat_data_2019_01_04_00_00.csv') as f: with open('sense_hat_data_2019_01_04_00_00.csv') as f:
datas = csv.reader(f) datas = csv.reader(f)
...@@ -15,6 +16,8 @@ print(temp) ...@@ -15,6 +16,8 @@ print(temp)
temp_decimate = signal.decimate(temp, 10, 3, zero_phase=True) temp_decimate = signal.decimate(temp, 10, 3, zero_phase=True)
print(temp_decimate) print(temp_decimate)
temp_mean = np.mean(temp)
print(temp_mean)
temp_filtered = signal.savgol_filter(temp, 53, 3) temp_filtered = signal.savgol_filter(temp, 53, 3)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment