/*Instructions: Please note that this macro is designed for analyzing images collected through an image splitter in which two channels display in the same image. The macro assumes you have collected an data set for background subtraction and that these data are in the same directory with the rest of the images. It is not necessary for them to be in the same sub-directory. If it runs properly, the macro should be able to search all subdirectories of the one returned from the prompt "Where are the files?" and return filepaths for ".tifs". If your image files have different extensions, you'll have to edit the macro below. A new folder for the analyzed data for each channel will be made inside the folder selected with the prompt "Where should the files be stored?". These are image chnanels. The data for ROIs made for the channels on different sides of the same image will be designated "green" or "red". Another curve fitting macro will store the rate constant information etc. in this folder. The macro is designed to analyze all the experiments performed at the same power level. You may select up to 10. The name of the first non-background file selected in the GUI will be automatically selected as the basename throughout the analysis. At the end, files for each channel at each power setting will made with a name appended with "_raw_values_channel_XX.txt" and "_normalized_channel_XX.txt" In the curve fitting macro choose the normalized version for analysis. Both are txt images which can be opened in text editing programs, Excel, or probably a number of softwares. Please note that each experiment has a corresponding time column (even numbers if counting starting with 0) Experimental columns are even number starting with 1. Please note that column number 1 in all of these txt images represent the raw background value which were subtracted from the experimental columns. */ macro"PSFRET analysis"{ run("Bio-Formats Macro Extensions"); //print("\\Clear"); roiManager("Reset"); run("Set Measurements...", "redirect=None decimal=9"); dir0=getDirectory("Where are the files?"); dir1=getDirectory("Where should the files be stored?"); startTime=getTime(); setBatchMode(false); dir0list=getFileList(dir0); ListOfFiles=newArray("None"); ListOfDirs=newArray("None"); for(i=0;i=height/2){//these were made in the green channel for(roiIndex=0;roiIndex