1
0
Fork 0
Data analysis on the light meter readings taken with the Light Meter project. The main area of study is the health and safety concerns regarding epilepsy.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

28 lines
852 B

import csv
import datetime
def load_raw_data(path):
data = list()
with open(path) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=",")
for r in csv_reader:
if (r[1] != "Time Stamp"):
data.append( (r[1], r[2]) )
return data
def save_rps_totals(totals, path):
with open(path, mode="w") as result:
wtr = csv.writer(result)
for k, v in totals.items():
wtr.writerow([k,v])
def save_rps_above_threshold(readings, path):
with open(path, mode="w", newline='') as result:
wtr = csv.writer(result)
for item in readings:
wtr.writerow([item])
def save_filtered_flickers(readings, path):
with open(path, mode="w") as results:
wtr = csv.writer(results, delimiter=',', lineterminator='\n')
wtr.writerows(readings)