/*Instructions: Make a new folder for the analyzed data. It's optional, but will keep things a little more tidy. Inside this folder new folders for each channel being analyzed will be made and the plots and rate constant information will be saved in the proper 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 (odd numbers if counting starting with 1) Experimental columns are even number starting with 2. Please note that column number 2 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){ getSelectionBounds(gXStart,gYStart,gWidth,gHeight); makeOval(gXStart,gYStart-220,gWidth,gHeight); waitForUser("Change ROI","Is this ROI OK for the other channel"); getSelectionBounds(rXStart,rYStart,rWidth,rHeight); }else{ getSelectionBounds(rXStart,rYStart,rWidth,rHeight); makeOval(rXStart,rYStart+220,rWidth,rHeight); waitForUser("Change ROI","Is this ROI OK for the other channel"); getSelectionBounds(gXStart,gYStart,gWidth,gHeight); } roiIndex=0; for(i=1;i<=channels;i++){ selectImage(OpenStack); Stack.setChannel(i); //********get the time stamps imageTimesArray=newArray(frames); for(j=i-1;j