Understanding the files for the SED Fitting Challenge


In [14]:
import pyfits as pf

In [2]:
example_file = pf.open('/home/mldantas/Dropbox/DoutoradoIAG/Challenge/models_forchallenge/Eku1.30Zm0.25T00.0300_iTp0.00_baseFe.fits') # with my personal path

In [3]:
example_file.info()


Filename: /home/mldantas/Dropbox/DoutoradoIAG/Challenge/models_forchallenge/Eku1.30Zm0.25T00.0300_iTp0.00_baseFe.fits
No.    Name         Type      Cards   Dimensions   Format
0    PRIMARY     PrimaryHDU      11   (53689,)     float32   

In [4]:
# see 'Dimensions'

In [5]:
print_header = example_file[0].header

In [6]:
print_header


Out[6]:
SIMPLE  =                    T /image conforms to FITS standard                 
BITPIX  =                  -32 /bits per data value                             
NAXIS   =                    1 /number of axes                                  
NAXIS1  =                53689 /                                                
EXTEND  =                    T /file may contain extensions                     
DATE    = '2016-11-08'         / Creation UTC (CCCC-MM-DD) date of FITS header  
COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy  
COMMENT and Astrophysics', volume 376, page 359; bibcode 2001A&A...376..359H    
CRVAL1  =        1680.20000000 /                                                
CDELT1  =       0.900000000000 /                                                
CRPIX1  =                    1 /                                                

In [7]:
print (print_header.keys())


['SIMPLE', 'BITPIX', 'NAXIS', 'NAXIS1', 'EXTEND', 'DATE', 'COMMENT', 'COMMENT', 'CRVAL1', 'CDELT1', 'CRPIX1']

In [8]:
data = print_header['CRVAL1']

In [9]:
data


Out[9]:
1680.2

In [10]:
print_header['CDELT1']


Out[10]:
0.9

In [11]:
print_header['CRPIX1']


Out[11]:
1

In [15]:
dataset = pf.getdata('/home/mldantas/Dropbox/DoutoradoIAG/Challenge/models_forchallenge/Eku1.30Zm0.25T00.0300_iTp0.00_baseFe.fits')

In [18]:
import matplotlib.pyplot as plt


/home/mldantas/anaconda2/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')

In [26]:
plt.plot(dataset)
plt.xlim(0,10000)
plt.show()



In [ ]: