#!/usr/bin/python -i from ROOT import gSystem gSystem.Load('pyfits2_h.so') from ROOT import * f = fits('20120304_018.fits.gz') #f = fits('20120304_012.drs.fits.gz') kk=f.GetPy_KeyKeys() kv=f.GetPy_KeyValues() kc=f.GetPy_KeyComments() kt=f.GetPy_KeyTypes() ck=f.GetPy_ColumnKeys() co=f.GetPy_ColumnOffsets() cn=f.GetPy_ColumnNums() cs=f.GetPy_ColumnSizes() ct=f.GetPy_ColumnTypes() cu=f.GetPy_ColumnUnits() print len(kk), len(kv), len(kc), len(kt) k=zip(kv,kc,kt) k = zip (kk, k) k = dict(k) print len(ck), len(co), len(cn), len(cs), len(ct), len(cu) c = zip(co,cn,cs,ct,cu) c = zip(ck ,c) c = dict(c) def printk(): for i in sorted(k): print i, k[i] def printc(): for i in sorted(c): print i, c[i]