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.
26 lines
1.2 KiB
26 lines
1.2 KiB
import csv |
|
import datetime |
|
from services import io_services, log_services, data_services |
|
# import pdb |
|
|
|
def main(): |
|
raw_data_path = "data/test-data.csv" |
|
rps_save_path = "data/results/readings-per-sec.csv" |
|
rps_above_thresh = "data/results/readings_above_threshold.csv" |
|
flicker_list = "data/results/flicker_list.csv" |
|
raw_data = io_services.load_raw_data(raw_data_path) |
|
# log_services.print_list(raw_data) |
|
time_tallies = data_services.tally_readings_per_second(raw_data) |
|
# log_services.print_dictionary(time_tallies) |
|
rps_totals = data_services.total_count_for_each_reading_per_second(time_tallies) |
|
# log_services.print_dictionary(rps_totals) |
|
io_services.save_rps_totals(rps_totals, rps_save_path) |
|
rps_above_herz = data_services.get_rps_above(4, time_tallies) |
|
# log_services.print_list(rps_above_two) |
|
io_services.save_rps_above_threshold(rps_above_herz, rps_above_thresh) |
|
flicker_entries = data_services.find_flickers(rps_above_herz, raw_data) |
|
# log_services.print_dictionary(flicker_tallies) |
|
io_services.save_rps_totals(flicker_tallies, flicker_entries) |
|
# filtered_flicker_entries = |
|
if __name__ == "__main__": |
|
main()
|
|
|