1
$\begingroup$

I'm just getting started with very primitive analysis of FITS data, and I have a 'raw' FITS file which I don't know how to get different wavebands of data from (if this is even possible).

Filename: casa_raw.fits No. Name Type Cards Dimensions Format 0 PRIMARY PrimaryHDU 33 () 1 EVENTS BinTableHDU 793 14621280R x 19C [1D, 1I, 1I, 1J, 1I, 1I, 1I, 1I, 1E, 1E, 1E, 1E, 1J, 1J, 1E, 1J, 1I, 1I, 32X] 2 GTI BinTableHDU 28 2R x 2C [1D, 1D]

Could anyone explain what exactly this information conveys?

$\endgroup$
  • $\begingroup$ Try to open the fits file (with 'fv') and open the header 1. $\endgroup$ – Py-ser Jul 12 '15 at 8:57
0
$\begingroup$

This shows that the file contains 3 Header-Data Units (HDUs; you can read more about this here). The headers contain meta-data. The primary HDU (0) has some 'cards' (basically keyword/value pairs most of the time, or comments) but no data. The next HDU (1, called 'EVENTS' in your file) is a binary table which contains 19 columns. Finally, the last HDU (2, also called GTI) contains another table with 2 columns. You can access the data in one of the columns of the EVENTS table using for example:

from astropy.io import fits
hdulist = fits.open('myfile.fits')
hdulist['EVENTS'].data['colname']

where colname is the name of one of the columns. You can find out the column names by looking at:

hdulist['EVENTS'].data.names
$\endgroup$
  • $\begingroup$ Many thanks. I'm trying those out right now. Is there an image in here somewhere that I'm missing? I downloaded this off Chandra's site, and I was hoping the 'raw data' contained the image data I'd need/want. Am I doing something horribly wrong here? $\endgroup$ – Chronum Jul 12 '15 at 10:42
  • $\begingroup$ This is a so-called 'event table' and does not contain an image, only the location of where photons hit the detector. If you open it in the SAO Ds9 tool, it will compute the image on-the-fly. You should also be able to reconstruct the table using the positions and brightnesses of the photons. $\endgroup$ – astrofrog Jul 15 '15 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.