I have a problem reading data from a fits file. Usually i can read data from a fits file just fine but now I have some data files which gives me some problems. When I try to read the file, which should contain three columns and a header, all i get is a table of numbers looking something like this:
[[ 64 195 45 ..., 0 0 0]]
Now this is integers and the data file really should contain three columns containing double and floats in three columns like this:
[9819.3801, 0.00000, 0.00000 ]
[9820.0025, 5.50764e-16, 1.62396e-16 ]
[820.6248, -3.75781e-17, 1.51864e-16]
I know that I should get these values because a package in IDL called mrdfits can be used to retrieve the values. I have tried looking into which data type the fits file contain and which formats, my code looks something like this:
f=pyfits.open('filename')
dat =f[1].data
print f.info
>> No. Name Type Cards Dimensions Format
>> 0 PRIMARY PrimaryHDU 4 () uint8
>> 1 PRIMARY PrimaryHDU 576 (156288, 1) uint8
>> None
print pyfits.getval('filename','xtension',1)
>> BINTABLE
print dat
>> [[ 64 195 45 ..., 0 0 0]]
My question is basically; is there another way I can read in the data so that it gives me the three columns of non-integer data? I am wondering if it is because the file is a BINTABLE that it is read in a different way than normally? Is there another way I can load the three columns than what I do at the moment? If you need me to clarify some points please ask, as I have tried out a number of things at the moment I am not sure which direction to take it. Any help would be much appreciated!