Created
July 31, 2012 15:43
-
-
Save davidwhogg/3217947 to your computer and use it in GitHub Desktop.
fits to csv!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyfits | |
import csv | |
if __name__ == "__main__": | |
hdulist = pyfits.open("foo.fits") | |
blob = hdulist[-1].data | |
with open('foo.csv', 'wb') as f: | |
writer = csv.writer(f) | |
writer.writerows(blob) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment