First working version of code to write psf out for a given gal pos'n.