added way to do random sample of catalog for galaxies