def get_jobids_from_file(direct, circuit_name=None, run_type=None, timestamp=None): ''' The jobids are loaded from the last saved file if direct=True. If not,they are loaded from the file specified by circuit name and run type and timestamp returns a 2-length list of the jobids and the data corresponding to the jobid stored in the pickle file. See Functions.Data_storage.save_jobdata() for more info of the data ''' if direct == True: loaded_jobiddata = store.load_last() elif direct == False: if circuit_name == None: circuit_name = input('Circuit name: ') if run_type == None: run_type = input('Run Type: ') if timestamp == None: date = input('Date of experiment (mm_dd):') time = input('Time of experiment (hh_mm_ss):') loaded_jobiddata = store.load_jobdata(circuit_name, run_type, date + '-' + time) else: loaded_jobiddata = store.load_jobdata(circuit_name, run_type, timestamp) nr_batches = loaded_jobiddata['Batchnumber'] jobids = [''] * nr_batches for job in loaded_jobiddata['Data']: jobids[job['batchno']] = job['Jobid'] return [jobids, loaded_jobiddata]
def get_tomoset_from_file(direct, circuit_name=None, run_type=None, timestamp=None): if direct == True: loaded_jobiddata = store.load_last() elif direct == False: if circuit_name == None: circuit_name = input('Circuit name: ') if run_type == None: run_type = input('Run Type: ') if timestamp == None: date = input('Date of experiment (mm_dd):') time = input('Time of experiment (hh_mm_ss):') loaded_jobiddata = store.load_jobdata(circuit_name, run_type, date + '-' + time) else: loaded_jobiddata = store.load_jobdata(circuit_name, run_type, timestamp) return loaded_jobiddata['tomoset']
def get_jobids_from_file(direct, circuit_name=None, run_type=None, timestamp=None): if direct == True: loaded_jobiddata = store.load_last() elif direct == False: if circuit_name == None: circuit_name = input('Circuit name: ') if run_type == None: run_type = input('Run Type: ') if timestamp == None: date = input('Date of experiment (mm_dd):') time = input('Time of experiment (hh_mm_ss):') loaded_jobiddata = store.load_jobdata(circuit_name, run_type, date + '-' + time) else: loaded_jobiddata = store.load_jobdata(circuit_name, run_type, timestamp) nr_batches = loaded_jobiddata['Batchnumber'] jobids = [''] * nr_batches for job in loaded_jobiddata['Data']: jobids[job['batchno']] = job['Jobid'] return [jobids, loaded_jobiddata]