What you have done here is make sci1
a reference to new0.data
which means the assignment to new0
also changes sci1
, so it is modifying the intended variable but your print loop is printing the same object twice.
If you want to have a copy instead of reference you have to use the objects copy method, in this case sci0 = new0.data.copy()
This is also not the way you are supposed to use numpy which pyfits uses to represent its images. Instead of loops you apply operations to full arrays which is in most cases easier to read and significantly faster. If you want to add two fits images represented as numpy arrays inplace:
new0.data += new1.data
print new0.data
or if you want to create a new image out of the sum of both inputs:
sum_image = new0.data + new1.data
# put it into an pyfits HDU (primary fits extension)
hdu = pyfits.PrimaryHDU(data=sum_image)