galaxy model fitting for photometry and shapes