//Note these macros are old and may require updating for the new version of DeconvolutionLab macro GeneratePSF { Dialog.create("Enter Acquisition Parameters"); Dialog.addNumber("Emission Wavelength: ",545); Dialog.addNumber("Refractive Index of Immersion (Water = 1.33, Oil = 1.515): ",1.515); Dialog.addNumber("NA of Objective: ",1.4); Dialog.show(); wavelength = Dialog.getNumber(); RI = Dialog.getNumber(); NA = Dialog.getNumber(); /* if ((NA == 1.4) && (RI <= (NA-0.04))) { newNA = (RI/1.515)*NA; NA = newNA; Dialog.create("Warning"); Dialog.addMessage("There is refractive index mismatch. NA has been corrected to " + NA + " to compensate."); Dialog.show(); } */ getPixelSize(unit,pX,pY,pZ); LateralRes = pX*1000; AxialRes = pZ*1000; ImageWidth = getWidth(); ImageHeight = getHeight(); ZSize = nSlices; pref = "plugins/PSFGenerator.txt"; info = "psf-BW-NI=" + RI + "\nLambda=" + wavelength + "\nResLateral=" + LateralRes + "\nResAxial=" + AxialRes + "\nLUT=Grays" + "\nNZ=" + ZSize + "\nNY=" + ImageHeight + "\nNX=" + ImageWidth + "\nType=32-bits\nNA="+NA+"\npsf-BW-accuracy=Better"; info=split(info,"\n"); file = File.open(pref); for (i=0;i