Don't use k for long loops.  Gets confused with k in small loop
Copy the coadd catalog to the output directory
Add the background map to the image
Rescale the variance in to have the actual mean noise level