added option to measure psf fwhm and ellipticity