Aidan Gray replied to the topic 'Saving CCD blob to FITS file' in the forum. 4 years ago

Ah wow, I figured it out. Very simple haha.
The 1D byte array that blob.getblobdata() returns IS the contents of the FITS file, in its entirety. All I had to do was open a new binary file and write this array to it:

fits = blob.getblobdata()
f = open('/dir/image.fits', 'wb')
f.write(fits)
f.close()


Read More...