This code aims to create a ".i" file for STECKMAP to read


In [1]:
import numpy  as np
import pandas as pd
import pyfits as pf
import os
import csv

In [2]:
spec_path        = '/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP'
list_path        = '/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/'
steck_codes_path = '../MY_STECKMAP_Codes/'
spec_list        = 'filelist_whan.csv'

In [3]:
specs = np.loadtxt(os.path.join(list_path, spec_list), dtype=str)

In [17]:
print specs


['G09_Y1_BN1_220.fit' 'G09_Y1_BS2_179.fit' 'G09_Y1_CN1_207.fit'
 'G09_Y1_CX1_374.fit' 'G09_Y1_EN1_398.fit' 'G09_Y1_IN1_110.fit'
 'G09_Y2_013_340.fit' 'G09_Y2_019_130.fit' 'G09_Y2_019_309.fit'
 'G09_Y2_033_187.fit' 'G09_Y4_207_212.fit' 'G09_Y4_221_242.fit'
 'G09_Y4_225_321.fit' 'G09_Y4_228_085.fit' 'G09_Y4_245_365.fit'
 'G09_Y4_260_236.fit' 'G09_Y6_074_093.fit' 'G12_Y1_AS2_352.fit'
 'G12_Y1_CS2_347.fit' 'G12_Y1_DN1_020.fit' 'G12_Y1_GND1_095.fit'
 'G12_Y1_IN1_204.fit' 'G12_Y1_IS1_124.fit' 'G12_Y3_030_041.fit'
 'G15_Y1_FS2_173.fit' 'G15_Y1_IN1_328.fit' 'G15_Y1_IS2_387.fit'
 'G15_Y2_001_354.fit']

In [18]:
# overall settings
age_min   = 6.3E7
age_max   = 17.8E9

available_bases = ["BC03", "MILES", "PHR", "GD05"]

In [19]:
output_file = open('/home/mldantas/Google Drive/Doutorado/STECKMAP/MY_STECKMAP_Codes/my_script.i', 'w')

In [20]:
print >> output_file, 'include,"/home/mldantas/Yorick/STECKMAP/Pierre/POP/pop_paths.i"'
print >> output_file, 'include,"sfit.i"'

final_code = []
for spec in range(specs.size):
    spec_temp   = (os.path.join(spec_path, specs[spec]))
    file_temp   = pf.open(spec_temp)
    header_temp = file_temp[0].header
    header_temp.insert(44, ('CDELT1', header_temp['CD1_1'], 'Wavelength at the ref pixel 2476 for STECKMAP'))
    cataid      = header_temp['CATAID']
    wl_i        = header_temp['WMIN']
    wl_f        = header_temp['WMAX']
    wl_step     = header_temp['CDELT1']
    z_temp      = header_temp['Z']
    s2n_temp    = header_temp['SN']
    
    header_temp['CRVAL1'] = 3727.7900                                 # Creating new info in the header
    crval1 = header_temp['CRVAL1']
    new_fits_name = os.path.splitext(specs[spec])[0]+'_modified.fit' # New file's name 
    file_temp.writeto(os.path.join(spec_path, new_fits_name))         # Saving new fits file, for STECKMAP to read
    new_spec_temp = os.path.join(spec_path, new_fits_name)            # 
    
    line00 = 'fv="%s" ' % new_spec_temp
    print >> output_file, '%s' % line00
    
    line01 = 'a=convert_all(fv,hdu=1,z0=%f,SNR0=%.2f,CDELT1=%.3f,CRVAL1=%.3f)' % (z_temp, s2n_temp, 
                                                                                            wl_step, crval1)
    print >> output_file, '%s' % line01
    
    line02 = 'b=bRbasis3([%.1f,%.1f],basisfile="%s",nbins=30,wavel=[%.3f,%.3f])' % (age_min, age_max, 
                                                                                    available_bases[1], wl_i, wl_f)
    print >> output_file, '%s' % line02
    
    line03 = 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)' #removed the RMASK for now
    print >> output_file, '%s' % line03
        
    final_code.append(line00)
    final_code.append(line01)
    final_code.append(line02)
    final_code.append(line03)
final_code = np.array(final_code).T

print final_code


[ 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y1_BN1_220_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.078710,SNR0=7.01,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y1_BS2_179_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.208850,SNR0=8.33,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y1_CN1_207_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.267610,SNR0=9.28,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y1_CX1_374_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.216470,SNR0=12.81,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3736.000,8856.460])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y1_EN1_398_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.218340,SNR0=10.58,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y1_IN1_110_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.170370,SNR0=10.36,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y2_013_340_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.256330,SNR0=2.73,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.550,8859.590])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y2_019_130_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.108050,SNR0=22.91,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.820,8858.830])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y2_019_309_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.193040,SNR0=11.00,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.820,8858.830])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y2_033_187_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.229400,SNR0=11.35,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.910,8858.930])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y4_207_212_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.172250,SNR0=13.46,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.620,8857.620])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y4_221_242_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.257550,SNR0=4.76,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3726.530,8857.580])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y4_225_321_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.229790,SNR0=6.99,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3726.530,8857.580])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y4_228_085_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.170050,SNR0=10.72,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3726.530,8857.580])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y4_245_365_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.200400,SNR0=10.87,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3726.220,8857.300])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y4_260_236_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.162940,SNR0=20.03,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3726.220,8857.300])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G09_Y6_074_093_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.138190,SNR0=13.24,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.880,8858.870])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y1_AS2_352_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.266710,SNR0=11.49,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y1_CS2_347_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.244070,SNR0=7.83,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y1_DN1_020_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.253980,SNR0=7.25,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y1_GND1_095_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.181580,SNR0=8.52,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y1_IN1_204_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.267840,SNR0=9.11,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y1_IS1_124_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.250200,SNR0=11.32,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G12_Y3_030_041_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.257580,SNR0=6.96,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3726.830,8857.890])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G15_Y1_FS2_173_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.198590,SNR0=16.89,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3736.000,8856.460])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G15_Y1_IN1_328_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.176530,SNR0=6.94,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.790,8856.730])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G15_Y1_IS2_387_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.255000,SNR0=8.94,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3736.000,8856.460])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)'
 'fv="/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G15_Y2_001_354_modified.fit" '
 'a=convert_all(fv,hdu=1,z0=0.193990,SNR0=9.68,CDELT1=1.036,CRVAL1=3727.790)'
 'b=bRbasis3([63000000.0,17800000000.0],basisfile="MILES",nbins=30,wavel=[3727.550,8859.590])'
 'x=sfit(a,b,kin=1,epar=3,nde=40,noskip=1,sav=1,L1="D3",xs=1,xe=1)']

In [21]:
output_file.close()

In [22]:
example = pf.open('/home/mldantas/Google Drive/Doutorado/GAMAII_SPEC/WHAN_NA_UVUP/G15_Y2_001_354_modified.fit')

In [23]:
example[0].header


Out[23]:
SIMPLE  =                    T / file does conform to FITS standard             
BITPIX  =                  -32 / number of bits per data pixel                  
NAXIS   =                    2 / number of data axes                            
NAXIS1  =                 4955 / length of data axis 1                          
NAXIS2  =                    5 / length of data axis 2                          
EXTEND  =                    T / FITS dataset may contain extensions            
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H 
BSCALE  =                   1. / True_value = BSCALE * FITS_value + BZERO       
BZERO   =                   0. / True_value = BSCALE * FITS_value + BZERO       
DATE    = '2015-03-24T12:58:02' / file creation date (YYYY-MM-DDThh:mm:ss UT)   
ORIGIN  = 'GAMA    '           / Source of the data                             
OBSERVAT= 'SSO     '           / Name of observatory                            
LATITUDE=            -31.27704 / Telescope latitude in deg                      
LONGITUD=             149.0661 / Telescope longitude in deg                     
ALTITUDE=                1164. / Telescope height above sea level in m          
TELESCOP= 'AAT     '           / 3.9m Anglo-Australian Telescope                
INSTRUME= 'AAOMEGA-2dF'        / AAOmega/2dF multi-fibre spectrograph           
SPECTID = 'RD      '           / Spectrograph ID                                
GRATID  = '385R 580V'          / Disperser ID                                   
DICHROIC= 'X5700   '           / Dichroic name                                  
PLATE   =                    0 / 2dF plate number                               
RDNOISE =                 3.49 / Readout noise in e-                            
GAIN    =                1.799 / Readout gain in e-/ADU                         
FIBRE   =                  354 / Fibre number                                   
PIVOT   =                  354 / Pivot number                                   
X       =                33223 / Fibre button x position on plate               
Y       =                56340 / Fibre button y position on plate               
THETA   =               314.72 / Fibre angle in deg                             
N_EXP   =                    3 / Number of exposures                            
T_EXP   =                3600. / Total exposure time in s                       
N_NIGHTS=                    1 / Number of nights over which exposures were spre
DATE-OBS= '2009-02-28'         / UT date of observation                         
UTMJD   =      54890.746989994 / Mean MJD of start of exposures                 
UTSTART = '17:33:34'           / UT of start of first exposure                  
UTEND   = '18:39:51'           / UT of end of last exposure                     
ZDSTART =                30.44 / Zenith distance at start of first exposure in d
ZDEND   =                31.22 / Zenith distance at end of last exposure in deg 
HASTART =                 -6.7 / Hour angle at start of first exposure in deg   
HAEND   =                 9.92 / Hour angle at end of last exposure in deg      
HEL_VC  =                24.45 / Heliocentric velocity correction in km/s       
CTYPE1  = 'Wavelength'         / Type of coordinate on axis 1                   
CUNIT1  = 'Angstrom'           / Units for axis 1                               
CRPIX1  =                2477. / WCS reference point                            
CDELT1  =        1.03593795339 / Wavelength at the ref pixel 2476 for STECKMAP  
CRVAL1  =              3727.79 / WCS reference value                            
CD1_1   =        1.03593795339 / WCS transformation matrix element              
CD1_2   =                   0. / WCS transformation matrix element              
CD2_1   =                   0. / WCS transformation matrix element              
CD2_2   =                   1. / WCS transformation matrix element              
ROW1    = 'Spectrum'           / Flux-calibrated spectrum in 10^-17 erg/s/cm^2/A
ROW2    = 'Error   '           / 1 sigma error spectrum                         
ROW3    = 'Spectrum_nocalib'   / Spectrum without flux calibration              
ROW4    = 'Error_nocalib'      / 1 sigma error spectrum (no flux calibration)   
ROW5    = 'Sky     '           / Sky spectrum (no flux calibration)             
FIELDID = 'G15_Y2_001'         / ID of GAMA AAT field                           
SPECID  = 'G15_Y2_001_354'     / ID of GAMA AAT spectrum                        
RA      =            217.94529 / RA of spectrum in deg (J2000)                  
DEC     =              -1.3193 / DEC of spectrum in deg (J2000)                 
WMIN    =              3727.55 / Minimum wavelength in A                        
WMAX    =              8859.59 / Maximum wavelength in A                        
Z       =              0.19399 / Heliocentric redshift                          
NQ      =                    4 / Normalised redshift quality (use nQ>2 for scien
PROB    =                   1. / Probability that redshift is correct           
SN      =                 9.68 / S/N as measured by runz                        
SN_ALT  =                 9.45 / Median S/N per pixel in 4500-6500 A band       
RFLUXFAC=          5.37841E-19 / Ratio of r-band petrosian to fibre flux        
CATAID  =               492701 / ID of matched GAMA object                      
OBJECT  =               492701 / ID of matched GAMA object                      
GAMANAME= 'GAMAJ143146.86-011909.4' / Name of matched GAMA object               
IC_FLAG =                 4104 / Catalogue source(s) of matched GAMA object     
DIST    =                 0.04 / Distance between spec and object in arcsec     
IS_SBEST=                    T / GAMA AAT spectrum with best redshift for this o

In [ ]: