some bad research code for growth curve photometry and analysis of galaxies