PRO elais2specview ; Read the ELAIS final catalog table, and construct a set of ; specview compatible files of the photometric information. ; In this version, all photometry is converted to mJy, and ; wavelenghts/frequencies are converted to micron ; Note, Jy = 10^-26 W m^-2 Hz^-1 ; Mark Allen, CDS, October 10, 2004 ;------------------------------------------------------------- read_data, file='elaiscatf_21a_numeric.dat', 3523, 75, a read_id, file='elaiscatf_21a_id.dat', 3523, b ; 20 cm radio sR = a[6,*] errR = a[7,*] sR_wave = 20.0 sR_wave_unit = 'cm' sR_wave_micron = sR_wave * 1.0E4 ; 175 um s175 = a[8,*] err175 = a[9,*] s175_wave = 175.0 s175_wave_unit = 'μm' s175_wave_micron = s175_wave ; 90 um s90 = a[12,*] err90 = a[13,*] s90_wave = 90.0 s90_wave_unit = 'μm' s90_wave_micron = s90_wave ; 15 um s15 = a[16,*] snr15 = a[17,*] snr_ok_indicies = where(snr15 gt 0.0) err15 = s15 * 0.0 err15[snr_ok_indicies] = s15[snr_ok_indicies]/snr15[snr_ok_indicies] s15_wave = 15.0 s15_wave_unit = 'μm' s15_wave_micron = s15_wave ; 7 um s7 = a[18,*] err7 = a[19,*] s7_wave = 7.0 s7_wave_unit = 'μm' s7_wave_micron = s7_wave ; J amj = a[23,*] errj = a[24,*] sj = 1.592 * 10^(-0.4 * amj) * 1.0E6 serrj = sj * errj / ( 2.5 * alog10(exp(1.0))) sj_wave_micron = 1.25 ; H amh = a[25,*] errh = a[26,*] sh = 1.024 * 10^(-0.4 * amh) * 1.0E6 serrh = sh * errh / ( 2.5 * alog10(exp(1.0))) sh_wave_micron = 1.65 ; K amk = a[27,*] errk = a[28,*] sk = 0.620 * 10^(-0.4 * amk) * 1.0E6 serrk = sk * errk / ( 2.5 * alog10(exp(1.0))) sk_wave_micron = 2.2 ; U am1 = a[36,*] em1 = a[41,*] sam1 = 1.71080 * 10^(-0.4 * am1) * 1.0E6 serram1 = sam1 * em1 / ( 2.5 * alog10(exp(1.0))) sam1_wave = 0.3609 ; g' am2 = a[37,*] em2 = a[42,*] sam2 = 3.87614 * 10^(-0.4 * am2) * 1.0E6 serram2 = sam2 * em2 / ( 2.5 * alog10(exp(1.0))) sam2_wave = 0.485727 ; r' am3 = a[38,*] em3 = a[43,*] sam3 = 3.14196 * 10^(-0.4 * am3) * 1.0E6 serram3 = sam3 * em3 / ( 2.5 * alog10(exp(1.0))) sam3_wave = 0.621577 ; i' am4 = a[39,*] em4 = a[44,*] sam4 = 2.51594 * 10^(-0.4 * am4) * 1.0E6 serram4 = sam4 * em4 / ( 2.5 * alog10(exp(1.0))) sam4_wave = 0.767141 ; z' am5 = a[40,*] em5 = a[45,*] sam5 = 2.21820 * 10^(-0.4 * am5) * 1.0E6 serram5 = sam5 * em5 / ( 2.5 * alog10(exp(1.0))) sam5_wave = 0.909870 for i=0,n_elements(b)-1 do begin ; ; print out current catalog object name print, b[i] ; Construct the filename for the output file filename = strcompress(b[i],/remove_all) + '_SED.txt' ; Open the output file and write openw,2,filename printf, 2, b[i] printf, 2, 'micron' printf, 2, 'mJy' if sR[i] > 0.0 then printf, 2, sR_wave_micron, sR[i], errR[i] if s175[i] > 0.0 then printf, 2, s175_wave_micron, s175[i], err175[i] if s90[i] > 0.0 then printf, 2, s90_wave_micron, s90[i], err90[i] if s15[i] > 0.0 then printf, 2, s15_wave_micron, s15[i], err15[i] if s7[i] > 0.0 then printf, 2, s7_wave_micron, s7[i], err7[i] if amk[i] > 0.0 then printf, 2, sk_wave_micron, sk[i], serrk[i] if amh[i] > 0.0 then printf, 2, sh_wave_micron, sh[i], serrh[i] if amj[i] > 0.0 then printf, 2, sj_wave_micron, sj[i], serrj[i] if am5[i] > 0.0 then printf, 2, sam5_wave, sam5[i], serram5[i] if am4[i] > 0.0 then printf, 2, sam4_wave, sam4[i], serram4[i] if am3[i] > 0.0 then printf, 2, sam3_wave, sam3[i], serram3[i] if am2[i] > 0.0 then printf, 2, sam2_wave, sam2[i], serram2[i] if am1[i] > 0.0 then printf, 2, sam1_wave, sam1[i], serram1[i] close, 2 ENDFOR close, 1 END ; of elais2specview.pro ---------------------------------------- PRO read_data, FILE=filename, rows, cols, array ; Creates and array with specified number of rows and cols ; Opens specified file and reads intot he array ; designed for reading the ELAIS colour catalog files ; elaiscatf_21a_numeric.dat ; define array array = DBLARR(cols, rows) ; open data file and read into the array OPENR, 1, (filename) READF,1, array CLOSE,1 END ; of read_data.pro ------------------------------------------ PRO read_id, FILE=filename, rows, array ; Creates and array with specified number of rows and cols ; Opens specified file and reads intot he array ; designed for reading the ELAIS colour catalog files ; elaiscatf_21a_id.dat ; define array array = STRARR(1,rows) ; open data file and read into the array OPENR, 1, (filename) READF,1, array CLOSE,1 END ; of read_data.pro -------------------------------------------