def sort_data(num_vincs=6): """ DESCRIPTION: Sorts data folders in Ejecta_Simulation_Data by vinc. CALLING SEQUENCE: sort_data(num_vincs=6) KEYWORDS: ## num_vincs: number of velocity increments (default 6; +0-5 km/s) """ parent = os.getcwd() folders = sorted(glob.glob(parent + '/Ejecta_Simulation_Data/5000e*')) for i in range(num_vincs): Path(parent + '/Ejecta_Simulation_Data/'+str(i)+'vinc').mkdir(parents=True, exist_ok=True) for folder in folders: vincnum = folder.split('/')[-1].split('_')[2][0] shutil.move(folder, parent + '/Ejecta_Simulation_Data/' + str(vincnum) + 'vinc')