<p>This shows that the file contains 3 Header-Data Units (HDUs; you can read more about this <a href="http://fits.gsfc.nasa.gov/fits_primer.html" rel="nofollow">here</a>). 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:</p>

<pre><code>from astropy.io import fits
hdulist = fits.open('myfile.fits')
hdulist['EVENTS'].data['colname']
</code></pre>

<p>where <code>colname</code> is the name of one of the columns. You can find out the column names by looking at:</p>

<pre><code>hdulist['EVENTS'].data.names
</code></pre>

CC BY-SA 3.0
2015-07-12T10:42:35.650Z
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](http://chandra.harvard.edu/photo/openFITS/xray_data.html), and I was hoping the 'raw data' contained the image data I'd need/want. Am I doing something horribly wrong here?
Chronum
CC BY-SA 3.0
2015-07-15T05:50:00.960Z
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.
astrofrog
CC BY-SA 3.0
2015-07-12T09:21:49.903Z
2015-07-12T09:21:49.903Z
astrofrog
<p>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).</p>

<p><code>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]</code></p>

<p>Could anyone explain what exactly this information conveys?</p>

CC BY-SA 3.0
2015-07-12T08:57:56.333Z
Try to open the fits file (with 'fv') and open the header 1.
Py-ser
<photography><astropy>
What does the BinTableHDU store?
Chronum
# What does the BinTableHDU store?

(Asked by: username_0 on 2015-07-11)

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?

**Tags:** photography, astropy
> **Comments:**
> **username_1**: Try to open the fits file (with 'fv') and open the header 1.  

---

## 1 answers

### Answer by username_2 on 2015-07-12. Score: 1 | Accepted answer

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

> **Comments:**
> **username_0**: 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](http://chandra.harvard.edu/photo/openFITS/xray_data.html), and I was hoping the 'raw data' contained the image data I'd need/want. Am I doing something horribly wrong here?  
> **username_2**: 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.  

---

