I should have added, this is my newBLOB method for post-exposure image processing:
def newBLOB(self, bp):
self.logger.info("new BLOB " + bp.name)
print("name: ", bp.name," size: ", bp.size," format: ", bp.format)
# get image data
fits=bp.getblobdata()
print(type(fits))
# write image data to BytesIO buffer
blobfile = io.BytesIO(fits)
# open a file and save buffer to disk
with open("%s.fits" % datetime.now(), "wb") as f:
f.write(blobfile.getvalue())
blobfile.close()