<commit_before>/////////////////////////////////////////////////////////////////
// gets folders

// direxperiment = getDirectory("Choose the Experiment Directory ");
// uncomment above to prompt user to pick the directory
direxperiment = "/Users/martinbrennan/Desktop/this/"


print("experiment directory: " + direxperiment);

pathstacks = direxperiment+'stacks'+'/'
print("pathstacks:" + pathstacks);

/////////////////////////////////////////////////////////////////



// Makes directories for image sequences
//list = getFileList(pathstacks);
//  for (i=0; i<list.length; i++)
//      File.makeDirectory(pathstacks+'sswell'+(i+1));

/////////////////////////////////////////////////////////////
//Concatenate stacks
/////////////////////////////////////////////////////////////
list = getFileList(pathstacks);
for (j=1; j<list.length; j++) {
	wellnumber = toString(j+".tif");
	for (i=0; i<list.length; i++){
		if (endsWith(list[i],wellnumber)) {
			print(j+","+list[i]);
			open(list[i]);
		}
	}
	run("Concatenate...", "all_open title=temp-stack");
	saveAs("Tiff", pathstacks+"well"+wellnumber);
	run("Close All");
}
// open(pathstacks+"_sscal_well1.tif");

// 		  print(list[i]);
//list = getFileList(pathstacks);
//  for (i=0; i<list.length; i++)<commit_msg>added comment to concatenate section<commit_after>/////////////////////////////////////////////////////////////////
// gets folders

// direxperiment = getDirectory("Choose the Experiment Directory ");
// uncomment above to prompt user to pick the directory
direxperiment = "/Users/martinbrennan/Desktop/this/"


print("experiment directory: " + direxperiment);

pathstacks = direxperiment+'stacks'+'/'
print("pathstacks:" + pathstacks);

/////////////////////////////////////////////////////////////////



// Makes directories for image sequences
//list = getFileList(pathstacks);
//  for (i=0; i<list.length; i++)
//      File.makeDirectory(pathstacks+'sswell'+(i+1));

/////////////////////////////////////////////////////////////
//Concatenate stacks from each position according to the ending position number
/////////////////////////////////////////////////////////////
list = getFileList(pathstacks);
for (j=1; j<list.length; j++) {
	wellnumber = toString(j+".tif");
	for (i=0; i<list.length; i++){
		if (endsWith(list[i],wellnumber)) {
			print(j+","+list[i]);
			open(list[i]);
		}
	}
	run("Concatenate...", "all_open title=temp-stack");
	saveAs("Tiff", pathstacks+"well"+wellnumber);
	run("Close All");
}
// open(pathstacks+"_sscal_well1.tif");

// 		  print(list[i]);
//list = getFileList(pathstacks);
//  for (i=0; i<list.length; i++)
{'fraction_non_alphanumeric': 0.3445635528330781, 'fraction_numerical': 0.004594180704441042, 'mean_word_length': 2.003448275862069, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1261336', 'n_tokens_mistral': 804, 'n_tokens_neox': 770, 'n_words': 154}