Thank you for the link, but I'm still a little confused.
I'm new to using Indi, and I'm using the PyIndi wrapper, so I'm not quite sure how to use the CCD::processBLOB. The code I started with is from the example here: www.indilib.org/develop/indi-python-bindings.html.
The relevant part at the end, where I receive the blob's data:
for blob in ccd_ccd1:
print("name: ", blob.name," size: ", blob.size," format: ", blob.format)
print("fits data type: ", type(fits))
# here you may use astropy.io.fits to access the fits data
The format of "blob" returns a bytearray object, and the size is 12104640.
Using astropy.io.fits I can create the fits file but the data is 1D. Can I make a call to CCD::processBLOB somehow to convert this into a 2D byte array that FITS viewers like?
Sorry, I'm not familiar with the PyIndi wrapper, and I wasn't suggesting that you try and call that C++ method.
I was just pointing you there in case you could read the code and see what kind of format the blob had.
If my memory serves me right, the blob data is in the fits file format as is (if it's of type FITS), but you should check.
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')