Column Number Column Description
1 CATAID Unique GAMA object ID
2 OBJID_SDSSDR7 centered
3 RA right-aligned
4 DEC right-aligned
5 KRON_RADIUS right-aligned
6 PETRO_RADIUS right-aligned
7 FLUX_AUTO_U right-aligned
8 FLUXERR_AUTO_U right-aligned
9 MAG_AUTO_U right-aligned
10 MAGERR_AUTO_U right-aligned
11 MAG_PETRO_U right-aligned
12 MAGERR_PETRO_U right-aligned
13 MAG_AUTO_G right-aligned
14 MAGERR_AUTO_G right-aligned
15 MAG_PETRO_G right-aligned
16 MAGERR_PETRO_G right-aligned
17 MAG_AUTO_R right-aligned
18 MAGERR_AUTO_R right-aligned
19 MAG_PETRO_R right-aligned
20 MAGERR_PETRO_R right-aligned
21 MAG_AUTO_I right-aligned
22 MAGERR_AUTO_I right-aligned
23 MAG_PETRO_I right-aligned
24 MAGERR_PETRO_I right-aligned
25 MAG_AUTO_Z right-aligned
26 MAGERR_AUTO_Z right-aligned
27 MAG_PETRO_Z right-aligned
28 MAGERR_PETRO_Z right-aligned
29 MAG_AUTO_Y right-aligned
30 MAGERR_AUTO_Y right-aligned
31 MAG_PETRO_Y right-aligned
32 MAGERR_PETRO_Y right-aligned
33 MAG_AUTO_J right-aligned
34 MAGERR_AUTO_J right-aligned
35 MAG_PETRO_J right-aligned
36 MAGERR_PETRO_J right-aligned
37 MAG_AUTO_H right-aligned
38 MAGERR_AUTO_H right-aligned
39 MAG_PETRO_H right-aligned
40 MAGERR_PETRO_H right-aligned
41 MAG_AUTO_K right-aligned
42 MAGERR_AUTO_K right-aligned
43 MAG_PETRO_K right-aligned
44 MAGERR_PETRO_K right-aligned
45 BEST_MAG_NUV right-aligned
46 BEST_MAGERR_NUV right-aligned
47 BEST_MAG_FUV right-aligned
48 BEST_MAGERR_FUV right-aligned
49 NMATCHUV right-aligned
50 NMATCHOPT right-aligned
51 NUVFLAG right-aligned
52 TOT_MAG_NUV right-aligned
53 TOT_MAGERR_NUV right-aligned
54 TOT_MAG_FUV right-aligned
55 TOT_MAGERR_FUV right-aligned
56 SPLIT_MAG_NUV right-aligned
57 SPLIT_MAGERR_NUV right-aligned
58 SPLIT_MAG_FUV right-aligned
59 SPLIT_MAGERR_FUV right-aligned
60 COG_MAG_NUV right-aligned
61 COG_MAGERR_NUV right-aligned
62 NN_DIST right-aligned
63 NN_NMATCH4 right-aligned
64 Column1 CATAID repetition

| 65 | SPLIT_MAG_NUV | right-aligned | | 66 | SPLIT_MAGERR_NUV | right-aligned | | 67 | SPLIT_MAG_FUV | right-aligned | | 68 | SPLIT_MAGERR_FUV | right-aligned | | 60 | COG_MAG_NUV | right-aligned | | 61 | COG_MAGERR_NUV | right-aligned | | 62 | NN_DIST | right-aligned | | 63 | NN_NMATCH4 | right-aligned | | 64 | Column1 | right-aligned |

SEX_INDEX_U,SEX_INDEX_G,SEX_INDEX_R,SEX_INDEX_I,SEX_INDEX_Z, SEX_INDEX_Y,SEX_INDEX_J,SEX_INDEX_H,SEX_INDEX_K,

CATAID,OBJID_SDSSDR7,RA,DEC,KRON_RADIUS,PETRO_RADIUS,FLUX_AUTO_U,FLUXERR_AUTO_U, MAG_AUTO_U,MAGERR_AUTO_U,MAG_PETRO_U,MAGERR_PETRO_U, MAG_AUTO_G,MAGERR_AUTO_G,MAG_PETRO_G,MAGERR_PETRO_G, MAG_AUTO_R,MAGERR_AUTO_R,MAG_PETRO_R,MAGERR_PETRO_R, MAG_AUTO_I,MAGERR_AUTO_I,MAG_PETRO_I,MAGERR_PETRO_I, MAG_AUTO_Z,MAGERR_AUTO_Z,MAG_PETRO_Z,MAGERR_PETRO_Z, MAG_AUTO_Y,MAGERR_AUTO_Y,MAG_PETRO_Y,MAGERR_PETRO_Y, MAG_AUTO_J,MAGERR_AUTO_J,MAG_PETRO_J,MAGERR_PETRO_J, MAG_AUTO_H,MAGERR_AUTO_H,MAG_PETRO_H,MAGERR_PETRO_H, MAG_AUTO_K,MAGERR_AUTO_K,MAG_PETRO_K,MAGERR_PETRO_K, BEST_MAG_NUV,BEST_MAGERR_NUV,BEST_MAG_FUV,BEST_MAGERR_FUV, NMATCHUV,NMATCHOPT,NUVFLAG,FUVFLAG,TOT_MAG_NUV,TOT_MAGERR_NUV,TOT_MAG_FUV,TOT_MAGERR_FUV, SPLIT_MAG_NUV,SPLIT_MAGERR_NUV,SPLIT_MAG_FUV,SPLIT_MAGERR_FUV,COG_MAG_NUV,COG_MAGERR_NUV, NN_DIST,NN_NMATCH4, Column1, SEX_INDEX_U,SEX_INDEX_G,SEX_INDEX_R,SEX_INDEX_I,SEX_INDEX_Z, SEX_INDEX_Y,SEX_INDEX_J,SEX_INDEX_H,SEX_INDEX_K, GAL_INDEX_U,GAL_INDEX_G,GAL_INDEX_R,GAL_INDEX_I,GAL_INDEX_Z, GAL_INDEX_Y,GAL_INDEX_J,GAL_INDEX_H,GAL_INDEX_K, GAL_ELLIP_R,GAL_CHI2_R,GAL_QFLAG_R,FILENAME,URL,URL_R,URL_K, U_MODEL,U_MODEL_ERR,G_MODEL,G_MODEL_ERR,R_MODEL,R_MODEL_ERR,I_MODEL,I_MODEL_ERR,Z_MODEL,Z_MODEL_ERR, KCORR_FUV_k0,KCORR_NUV_k0,KCORR_U_k0,KCORR_G_k0,KCORR_R_k0,KCORR_I_k0,KCORR_Z_k0,KCORR_Y_k0, KCORR_J_k0,KCORR_H_k0,KCORR_K_k0,CHI2_k0,MASS_k0,INTSFH_k0,METS_k0,B300_k0,B1000_k0 KCORR_FUV_k1,KCORR_NUV_k1,KCORR_U_k1,KCORR_G_k1,KCORR_R_k1,KCORR_I_k1,KCORR_Z_k1,KCORR_Y_k1, KCORR_J_k1,KCORR_H_k1,KCORR_K_k1,CHI2_k1,MASS_k1,INTSFH_k1,METS_k1,B300_k1,B1000_k1, Column2, EBV,A_FUV,A_NUV,A_B,A_u,A_g,A_r,A_i,A_z, Column3, A_Y,A_J,A_H,A_K,Column4, SPECID_BEST,Z_HELIO, MAG_AB_FUV,MAG_AB_NUV,MAG_AB_U,MAG_AB_G,MAG_AB_R,MAG_AB_I,MAG_AB_Z,MAG_AB_Y,MAG_AB_J,MAG_AB_H,MAG_AB_K, MAG_ABSOLUTE_FUV,MAG_ABSOLUTE_NUV,MAG_ABSOLUTE_U,MAG_ABSOLUTE_G,MAG_ABSOLUTE_R,MAG_ABSOLUTE_I,MAG_ABSOLUTE_Z, MAG_ABSOLUTE_Y,MAG_ABSOLUTE_J,MAG_ABSOLUTE_H,MAG_ABSOLUTE_K, UV_CLASS_YI2011

| 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned | | 18 | MAGERR_PETRO_U | right-aligned |


In [1]:
import numpy as np
import pandas as pd

In [20]:
my_data  = np.loadtxt('../Catalogue/Match07_smalldoubleclean_emlines.csv', delimiter=',', dtype=str)
my_data2 = np.loadtxt('../Match/Match07_Match06small.csv', delimiter=',', dtype=str)

In [4]:
print my_data[0,:]


['CATAID' 'OBJID_SDSSDR7' 'ALPHA_J2000' 'DELTA_J2000' 'KRON_RADIUS'
 'PETRO_RADIUS' 'MAG_PETRO_u' 'MAGERR_PETRO_u' 'FLAGS_u' 'MAG_PETRO_g'
 'MAGERR_PETRO_g' 'FLAGS_g' 'MAG_PETRO_r' 'MAGERR_PETRO_r' 'FLAGS_r'
 'MAG_PETRO_i' 'MAGERR_PETRO_i' 'FLAGS_i' 'MAG_PETRO_z' 'MAGERR_PETRO_z'
 'FLAGS_z' 'MAG_PETRO_X' 'MAGERR_PETRO_X' 'FLAGS_X' 'MAG_PETRO_Y'
 'MAGERR_PETRO_Y' 'FLAGS_Y' 'MAG_PETRO_J' 'MAGERR_PETRO_J' 'FLAGS_J'
 'MAG_PETRO_H' 'MAGERR_PETRO_H' 'FLAGS_H' 'MAG_PETRO_K' 'MAGERR_PETRO_K'
 'FLAGS_K' 'FLAGS' 'PSFMAG_R' 'FIBERMAG_R' 'FLAGS_R_SDSS' 'PETRORAD_R'
 'PETROR90_R' 'PETROR50_R' 'PETROMAG_R' 'MODELMAG_U' 'MODELMAG_G'
 'MODELMAG_R' 'MODELMAG_I' 'MODELMAG_Z' 'STATUS' 'BEST_MAG_NUV'
 'BEST_MAGERR_NUV' 'BEST_MAG_FUV' 'BEST_MAGERR_FUV' 'BEST_METHOD'
 'NMATCHUV' 'NMATCHOPT' 'NUVFLAG' 'FUVFLAG' 'NN_DIST' 'NN_NMATCH4'
 'NN_MANY2ONE' 'NN_SFLAGS_NUV' 'NN_SFLAGS_FUV' 'KCORR_FUV' 'KCORR_NUV'
 'KCORR_U' 'KCORR_G' 'KCORR_R' 'KCORR_I' 'KCORR_Z' 'KCORR_Y' 'KCORR_J'
 'KCORR_H' 'KCORR_K' 'CHI2' 'MASS' 'INTSFH' 'METS' 'B300' 'B1000'
 'SURVEY_CODE' 'SURVEY_CLASS' 'nbands' 'S2N' 'PPP' 'logmstar' 'dellogmstar'
 'logmoverl_i' 'dellogmoverl_i' 'logage' 'dellogage' 'logtau' 'dellogtau'
 'logmintsfh' 'dellogmintsfh' 'logmremnants' 'dellogmremnants' 'metal'
 'delmetal' 'extBV' 'delextBV' 'logLWage' 'dellogLWage' 'gminusi'
 'delgminusi' 'uminusr' 'deluminusr' 'gminusi_stars' 'uminusr_stars'
 'C_logM_ur' 'C_logM_gi' 'C_logM_eBV' 'SPECID' 'SURVEY_CODE_EMLINES' 'SN'
 'D4000N' 'D4000N_ERR' 'SURVEY' 'Z' 'NQ' 'PROB' 'HB_FLUX_COMP'
 'HB_FLUX_ERR_COMP' 'HB_EW_COMP' 'HB_EW_ERR_COMP' 'OIIIR_FLUX_COMP'
 'OIIIR_FLUX_ERR_COMP' 'OIIIR_EW_COMP' 'OIIIR_EW_ERR_COMP' 'HA_FLUX_COMP'
 'HA_FLUX_ERR_COMP' 'HA_EW_COMP' 'HA_EW_ERR_COMP' 'NIIR_FLUX_COMP'
 'NIIR_FLUX_ERR_COMP' 'NIIR_EW_COMP' 'NIIR_EW_ERR_COMP' 'MAG_AB_FUV'
 'MAG_AB_NUV' 'MAG_AB_U' 'MAG_AB_G' 'MAG_AB_R' 'MAG_AB_I' 'MAG_AB_Z'
 'MAG_AB_Y' 'MAG_AB_J' 'MAG_AB_H' 'MAG_AB_K' 'MAG_ABSOLUTE_FUV'
 'MAG_ABSOLUTE_NUV' 'MAG_ABSOLUTE_U' 'MAG_ABSOLUTE_G' 'MAG_ABSOLUTE_R'
 'MAG_ABSOLUTE_I' 'MAG_ABSOLUTE_Z' 'MAG_ABSOLUTE_Y' 'MAG_ABSOLUTE_J'
 'MAG_ABSOLUTE_H' 'MAG_ABSOLUTE_K' 'UV_CLASS_YI2011' 'BPT_CLASS'
 'WHAN_CLASS']

In [21]:
header  = my_data[0,:]
header2 = my_data2[0,:]

In [22]:
print header.size
print header2.size


163
154

In [19]:
schema = []
for i in range(header.size):
    line = '|%15d' '|%20s|                    |'
    lines = (line % (i, header[i]))
    print lines
    schema.append(lines)
    
print >> '../Catalogue/headers.txt', object(schema)


|              0|              CATAID|                    |
|              1|       OBJID_SDSSDR7|                    |
|              2|         ALPHA_J2000|                    |
|              3|         DELTA_J2000|                    |
|              4|         KRON_RADIUS|                    |
|              5|        PETRO_RADIUS|                    |
|              6|         MAG_PETRO_u|                    |
|              7|      MAGERR_PETRO_u|                    |
|              8|             FLAGS_u|                    |
|              9|         MAG_PETRO_g|                    |
|             10|      MAGERR_PETRO_g|                    |
|             11|             FLAGS_g|                    |
|             12|         MAG_PETRO_r|                    |
|             13|      MAGERR_PETRO_r|                    |
|             14|             FLAGS_r|                    |
|             15|         MAG_PETRO_i|                    |
|             16|      MAGERR_PETRO_i|                    |
|             17|             FLAGS_i|                    |
|             18|         MAG_PETRO_z|                    |
|             19|      MAGERR_PETRO_z|                    |
|             20|             FLAGS_z|                    |
|             21|         MAG_PETRO_X|                    |
|             22|      MAGERR_PETRO_X|                    |
|             23|             FLAGS_X|                    |
|             24|         MAG_PETRO_Y|                    |
|             25|      MAGERR_PETRO_Y|                    |
|             26|             FLAGS_Y|                    |
|             27|         MAG_PETRO_J|                    |
|             28|      MAGERR_PETRO_J|                    |
|             29|             FLAGS_J|                    |
|             30|         MAG_PETRO_H|                    |
|             31|      MAGERR_PETRO_H|                    |
|             32|             FLAGS_H|                    |
|             33|         MAG_PETRO_K|                    |
|             34|      MAGERR_PETRO_K|                    |
|             35|             FLAGS_K|                    |
|             36|               FLAGS|                    |
|             37|            PSFMAG_R|                    |
|             38|          FIBERMAG_R|                    |
|             39|        FLAGS_R_SDSS|                    |
|             40|          PETRORAD_R|                    |
|             41|          PETROR90_R|                    |
|             42|          PETROR50_R|                    |
|             43|          PETROMAG_R|                    |
|             44|          MODELMAG_U|                    |
|             45|          MODELMAG_G|                    |
|             46|          MODELMAG_R|                    |
|             47|          MODELMAG_I|                    |
|             48|          MODELMAG_Z|                    |
|             49|              STATUS|                    |
|             50|        BEST_MAG_NUV|                    |
|             51|     BEST_MAGERR_NUV|                    |
|             52|        BEST_MAG_FUV|                    |
|             53|     BEST_MAGERR_FUV|                    |
|             54|         BEST_METHOD|                    |
|             55|            NMATCHUV|                    |
|             56|           NMATCHOPT|                    |
|             57|             NUVFLAG|                    |
|             58|             FUVFLAG|                    |
|             59|             NN_DIST|                    |
|             60|          NN_NMATCH4|                    |
|             61|         NN_MANY2ONE|                    |
|             62|       NN_SFLAGS_NUV|                    |
|             63|       NN_SFLAGS_FUV|                    |
|             64|           KCORR_FUV|                    |
|             65|           KCORR_NUV|                    |
|             66|             KCORR_U|                    |
|             67|             KCORR_G|                    |
|             68|             KCORR_R|                    |
|             69|             KCORR_I|                    |
|             70|             KCORR_Z|                    |
|             71|             KCORR_Y|                    |
|             72|             KCORR_J|                    |
|             73|             KCORR_H|                    |
|             74|             KCORR_K|                    |
|             75|                CHI2|                    |
|             76|                MASS|                    |
|             77|              INTSFH|                    |
|             78|                METS|                    |
|             79|                B300|                    |
|             80|               B1000|                    |
|             81|         SURVEY_CODE|                    |
|             82|        SURVEY_CLASS|                    |
|             83|              nbands|                    |
|             84|                 S2N|                    |
|             85|                 PPP|                    |
|             86|            logmstar|                    |
|             87|         dellogmstar|                    |
|             88|         logmoverl_i|                    |
|             89|      dellogmoverl_i|                    |
|             90|              logage|                    |
|             91|           dellogage|                    |
|             92|              logtau|                    |
|             93|           dellogtau|                    |
|             94|          logmintsfh|                    |
|             95|       dellogmintsfh|                    |
|             96|        logmremnants|                    |
|             97|     dellogmremnants|                    |
|             98|               metal|                    |
|             99|            delmetal|                    |
|            100|               extBV|                    |
|            101|            delextBV|                    |
|            102|            logLWage|                    |
|            103|         dellogLWage|                    |
|            104|             gminusi|                    |
|            105|          delgminusi|                    |
|            106|             uminusr|                    |
|            107|          deluminusr|                    |
|            108|       gminusi_stars|                    |
|            109|       uminusr_stars|                    |
|            110|           C_logM_ur|                    |
|            111|           C_logM_gi|                    |
|            112|          C_logM_eBV|                    |
|            113|              SPECID|                    |
|            114| SURVEY_CODE_EMLINES|                    |
|            115|                  SN|                    |
|            116|              D4000N|                    |
|            117|          D4000N_ERR|                    |
|            118|              SURVEY|                    |
|            119|                   Z|                    |
|            120|                  NQ|                    |
|            121|                PROB|                    |
|            122|        HB_FLUX_COMP|                    |
|            123|    HB_FLUX_ERR_COMP|                    |
|            124|          HB_EW_COMP|                    |
|            125|      HB_EW_ERR_COMP|                    |
|            126|     OIIIR_FLUX_COMP|                    |
|            127| OIIIR_FLUX_ERR_COMP|                    |
|            128|       OIIIR_EW_COMP|                    |
|            129|   OIIIR_EW_ERR_COMP|                    |
|            130|        HA_FLUX_COMP|                    |
|            131|    HA_FLUX_ERR_COMP|                    |
|            132|          HA_EW_COMP|                    |
|            133|      HA_EW_ERR_COMP|                    |
|            134|      NIIR_FLUX_COMP|                    |
|            135|  NIIR_FLUX_ERR_COMP|                    |
|            136|        NIIR_EW_COMP|                    |
|            137|    NIIR_EW_ERR_COMP|                    |
|            138|          MAG_AB_FUV|                    |
|            139|          MAG_AB_NUV|                    |
|            140|            MAG_AB_U|                    |
|            141|            MAG_AB_G|                    |
|            142|            MAG_AB_R|                    |
|            143|            MAG_AB_I|                    |
|            144|            MAG_AB_Z|                    |
|            145|            MAG_AB_Y|                    |
|            146|            MAG_AB_J|                    |
|            147|            MAG_AB_H|                    |
|            148|            MAG_AB_K|                    |
|            149|    MAG_ABSOLUTE_FUV|                    |
|            150|    MAG_ABSOLUTE_NUV|                    |
|            151|      MAG_ABSOLUTE_U|                    |
|            152|      MAG_ABSOLUTE_G|                    |
|            153|      MAG_ABSOLUTE_R|                    |
|            154|      MAG_ABSOLUTE_I|                    |
|            155|      MAG_ABSOLUTE_Z|                    |
|            156|      MAG_ABSOLUTE_Y|                    |
|            157|      MAG_ABSOLUTE_J|                    |
|            158|      MAG_ABSOLUTE_H|                    |
|            159|      MAG_ABSOLUTE_K|                    |
|            160|     UV_CLASS_YI2011|                    |
|            161|           BPT_CLASS|                    |
|            162|          WHAN_CLASS|                    |
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-19-f7339b7bb905> in <module>()
      6     schema.append(lines)
      7 
----> 8 print >> '../Catalogue/headers.txt', object(schema)

TypeError: object() takes no parameters
Column Number Column Description
0 CATAID Unique GAMA object ID
1 OBJID_SDSSDR7 SDSS DR7 objid
2 RA J2000 coordinate
3 DEC J2000 coordinate
4 KRON_RADIUS Kron radius (r band)
5 PETRO_RADIUS Petrosian radius (r band)
6 FLUX_AUTO_U Kron flux (u band)
7 FLUXERR_AUTO_U Kron flux error (u band)
8 MAG_AUTO_U Kron magnitude (u band)
9 MAGERR_AUTO_U Kron magnitude error (u band)
10 MAG_PETRO_U Petrosian magnitude (u band)
11 MAGERR_PETRO_U Petrosian magnitude error (u band)
12 MAG_AUTO_G Kron magnitude (g band)
13 MAGERR_AUTO_G Kron magnitude error (g band)
14 MAG_PETRO_G Petrosian magnitude (g band)
15 MAGERR_PETRO_G Petrosian magnitude error (g band)
16 MAG_AUTO_R Kron magnitude (r band)
17 MAGERR_AUTO_R Kron magnitude error (r band)
18 MAG_PETRO_R Petrosian magnitude (r band)
19 MAGERR_PETRO_R Petrosian magnitude error (r band)
20 MAG_AUTO_I Kron magnitude (i band)
21 MAGERR_AUTO_I Kron magnitude error (i band)
22 MAG_PETRO_I Petrosian magnitude (i band)
23 MAGERR_PETRO_I Petrosian magnitude error (i band)
24 MAG_AUTO_Z Kron magnitude (z band)
25 MAGERR_AUTO_Z Kron magnitude error (z band)
26 MAG_PETRO_Z Petrosian magnitude (z band)
27 MAGERR_PETRO_Z Petrosian magnitude error (z band)
28 MAG_AUTO_Y Kron magnitude (Y band)
29 MAGERR_AUTO_Y Kron magnitude error (Y band)
30 MAG_PETRO_Y Petrosian magnitude (Y band)
31 MAGERR_PETRO_Y Petrosian magnitude error (Y band)
32 MAG_AUTO_J Kron magnitude (J band)
33 MAGERR_AUTO_J Kron magnitude error (J band)
34 MAG_PETRO_J Petrosian magnitude (J band)
35 MAGERR_PETRO_J Petrosian magnitude error (J band)
36 MAG_AUTO_H Kron magnitude (H band)
37 MAGERR_AUTO_H Kron magnitude error (H band)
38 MAG_PETRO_H Petrosian magnitude (H band)
39 MAGERR_PETRO_H Petrosian magnitude error (H band)
40 MAG_AUTO_K Kron magnitude (K band)
41 MAGERR_AUTO_K Kron magnitude error (K band)
42 MAG_PETRO_K Petrosian magnitude (K band)
43 MAGERR_PETRO_K Petrosian magnitude error (K band)
44 BEST_MAG_NUV Best estimate of the GAMA object's NUV magnitude
45 BEST_MAGERR_NUV Best estimate of the GAMA object's NUV magnitude error
46 BEST_MAG_FUV Best estimate of the GAMA object's FUV magnitude
47 BEST_MAGERR_FUV Best estimate of the GAMA object's NUV magnitude error
48 NMATCHUV
49 NMATCHOPT
50 NUVFLAG
51 FUVFLAG
52 TOT_MAG_NUV
53 TOT_MAGERR_NUV
54 TOT_MAG_FUV
55 TOT_MAGERR_FUV
56 SPLIT_MAG_NUV
57 SPLIT_MAGERR_NUV
58 SPLIT_MAG_FUV
59 SPLIT_MAGERR_FUV
60 COG_MAG_NUV
61 COG_MAGERR_NUV
62 NN_DIST
63 NN_NMATCH4
64 Column1 Repetition of CATAID
65 SEX_INDEX_U
66 SEX_INDEX_G
67 SEX_INDEX_R
68 SEX_INDEX_I
69 SEX_INDEX_Z
70 SEX_INDEX_Y
71 SEX_INDEX_J
72 SEX_INDEX_H
73 SEX_INDEX_K
74 GAL_INDEX_U
75 GAL_INDEX_G
76 GAL_INDEX_R
77 GAL_INDEX_I
78 GAL_INDEX_Z
79 GAL_INDEX_Y
80 GAL_INDEX_J
81 GAL_INDEX_H
82 GAL_INDEX_K
83 GAL_ELLIP_R
84 GAL_CHI2_R
85 GAL_QFLAG_R
86 FILENAME
87 URL
88 URL_R
89 URL_K
90 U_MODEL
91 U_MODEL_ERR
92 G_MODEL
93 G_MODEL_ERR
94 R_MODEL
95 R_MODEL_ERR
96 I_MODEL
97 I_MODEL_ERR
98 Z_MODEL
99 Z_MODEL_ERR
100 KCORR_FUV_k0
101 KCORR_NUV_k0
102 KCORR_U_k0
103 KCORR_G_k0
104 KCORR_R_k0
105 KCORR_I_k0
106 KCORR_Z_k0
107 KCORR_Y_k0
108 KCORR_J_k0
109 KCORR_H_k0
110 KCORR_K_k0
111 CHI2_k0
112 MASS_k0
113 INTSFH_k0
114 METS_k0
115 B300_k0
116 B1000_k0
117 KCORR_FUV_k1
118 KCORR_NUV_k1
119 KCORR_U_k1
120 KCORR_G_k1
121 KCORR_R_k1
122 KCORR_I_k1
123 KCORR_Z_k1
124 KCORR_Y_k1
125 KCORR_J_k1
126 KCORR_H_k1
127 KCORR_K_k1
128 CHI2_k1
129 MASS_k1
130 INTSFH_k1
131 METS_k1
132 B300_k1
133 B1000_k1
134 Column2
135 EBV
136 A_FUV
137 A_NUV
138 A_B
139 A_u
140 A_g
141 A_r
142 A_i
143 A_z
144 Column3
145 A_Y
146 A_J
147 A_H
148 A_K
149 Column4
150 SPECID_BEST
151 Z_HELIO
152 MAG_AB_FUV
153 MAG_AB_NUV
154 MAG_AB_U
155 MAG_AB_G
156 MAG_AB_R
157 MAG_AB_I
158 MAG_AB_Z
159 MAG_AB_Y
160 MAG_AB_J
161 MAG_AB_H
162 MAG_AB_K
163 MAG_ABSOLUTE_FUV
164 MAG_ABSOLUTE_NUV
165 MAG_ABSOLUTE_U
166 MAG_ABSOLUTE_G
167 MAG_ABSOLUTE_R
168 MAG_ABSOLUTE_I
169 MAG_ABSOLUTE_Z
170 MAG_ABSOLUTE_Y
171 MAG_ABSOLUTE_J
172 MAG_ABSOLUTE_H
173 MAG_ABSOLUTE_K
174 UV_CLASS_YI2011

In [ ]:
schema = []
for i in range(header.size):
    line = '|%15d' '|%20s|                    |'
    lines = (line % (i, header[i]))
    print lines
    schema.append(lines)