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