First working version of psf_photometry