Removing use of clobber keyword which was deprecated in Astropy 1.3, and removed as of Astropy 5.1.
In addition, fixing bug where updating the WCS reference pixel was hardcoded, assuming it was the central pixel. This is not always the case, so now we set it based on the current reference pixel.
Removing use of clobber keyword which was deprecated in Astropy 1.3, and removed as of Astropy 5.1. In addition, fixing bug where updating the WCS reference pixel was hardcoded, assuming it was the central pixel. This is not always the case, so now we set it based on the current reference pixel.