/*Information This macro asks for a text file containing the data output by the psFRET_dual_view_image_analysis macro It is currently expecting images collected using Micromanager simply to generate a BaseFileName hence "_MMStack" in one of the lines below. Most of our data has three channels with the photoswitching data in Channel3. This is why you'll see booleans checking for "Channel3" */ macro"PSFRET curve fit"{ cameraGain=2.17; binFactor=4; lambda=500;//wavelenth in nm NA=1.4; pixSize=39;//nm pixCount=5000; print("\\Clear"); run("Set Measurements...", "redirect=None decimal=9"); run("Clear Results"); OpenFilePath=File.openDialog("Pick the txt file with the data"); ImportResultsTable(OpenFilePath); BaseFileName=substring(File.nameWithoutExtension,0,indexOf(File.nameWithoutExtension,"_MMStack")); dir0=File.directory; print(dir0); print(BaseFileName); headings=split(String.getResultsHeadings); exptsToFit=newArray(); timesForFit=newArray(); for(i=2;iymax/2){ i++; if(i==yArrayForT1half.length) return "noTOneHalf"; } t1halfToReturn=xArrayForT1half[i]-xmin; return t1halfToReturn; } function arraySubtractValue(theArray,value){ for(i=0;i