# small programm to loop the plot_msg function # until all desired RGB images are processed from time import time, sleep import os.path from os import remove if __name__ == '__main__': from plot_msg import plot_msg, print_usage #from postprocessing import postprocessing import sys from get_input_msg import get_date_and_inputfile_from_commandline in_msg = get_date_and_inputfile_from_commandline(print_usage=print_usage) # interpret additional command line arguments if len(sys.argv) > 7: if type(sys.argv[7]) is str: in_msg.RGBs = [sys.argv[7]] else: in_msg.RGBs = sys.argv[7] if len(sys.argv) > 8: if type(sys.argv[8]) is str: in_msg.area = [sys.argv[8]] else: in_msg.area = sys.argv[8] delta_time = 30 # time in seconds to wait between the tries total_time = 1800 # maximum total time in seconds trying to get images
# time_end = deepcopy(time_start) #else: # print(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5],sys.argv[6]) # year = int(sys.argv[2]) # month = int(sys.argv[3]) # day = int(sys.argv[4]) # hour = int(sys.argv[5]) # minutes = int(sys.argv[6]) # #time1 = datetime(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5],sys.argv[6]) # time_start = datetime(year, month, day, hour, minutes) # time_start_save = deepcopy(time_start) # #in_msg = get_input_msg(input_file, timeslot=time_start) from get_input_msg import get_date_and_inputfile_from_commandline in_msg = get_date_and_inputfile_from_commandline() time_start = deepcopy(in_msg.datetime) time_start_save = deepcopy(time_start) if len(sys.argv)>7: id_interesting_cell = int(sys.argv[7]) if len(sys.argv)>8: year = int(sys.argv[8]) month = int(sys.argv[9]) day = int(sys.argv[10]) hour = int(sys.argv[11]) minutes = int(sys.argv[10]) time_end = datetime(year, month, day, hour, minutes) else: