tuning psf function