;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- I -- Initialization And Input Verification -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--I.1-- Directories spawn, 'hostname', host case strTrim(host) of 'hyperion': dirEuclid = '/observ/euclid/' 'endymion': dirEuclid = '/home/bcarry/work/data/euclid/' else: stop endcase filterDir = dirEuclid+'filters/' doTABLE=1 ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- II -- Filter/Spectra to Colors -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--II.1-- Euclid filters filtName=['Vis', 'Y', 'J', 'H'] filtWave=[0.725,1.020,1.252,1.645] nbFilt=n_elements(filtName) centWave = fltarr(4) waveToMicron=1e-4 ;--II.2-- Typical Filter readcol, filterDIR+'EuclidVisFilterMin.txt', w, t, /SILENT ref = {wave:w*waveToMicron, trans:t} ;--II.3-- Read Bus-DeMeo average spectra demeo = readBusDeMeo() taxoEuclid = replicate({class:'', color:replicate({ref:0., unc:0.},nbFilt)},demeo.N) taxoEuclid.class = demeo.class.name ;--II.4-- Convert Spectra into Colors filt=replicate(ref,nbFilt) for kFilt=0, nbFilt-1 do begin ;--II.4.1-- Read current filter print, filtName[kFilt] readcol, filterDIR+'Euclid'+filtName[kFilt]+'FilterMin.txt', w, t, /SILENT ;--II.4.2-- Correct bad J Filter transmission if strcmp(filtName[kFilt],'J') then begin band = where( w ge 1.2/waveToMicron and w le 1.55/waveToMicron ) t*=0 t[band]=0.4 endif ;--II.4.3-- Convert to micron filt[kFilt].wave=w*waveToMicron filt[kFilt].trans= t cur = {wave:w*waveToMicron, trans:t} ;--II.4.4-- Store mid-filter wavelength noZero = where( cur.trans ne 0 ) centWave[kFilt] = mean( cur.wave[noZero] ) ;--II.4.5-- Convolve spectra with filter transmission curve conv = convertTaxoToColor( demeo, cur, ref ) taxoEuclid[*].color[kFilt].ref = conv.ref taxoEuclid[*].color[kFilt].unc = conv.unc endfor filtWave = centWave ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- III -- Multi-panel Figure -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; if doTABLE eq 1 then begin ;--III.1-- EPS/PNG output cgPS_open, xSize=29.7, ySize=21., Filename=filterDir+'euclid-taxonomy.eps', $ /metric, /decomposed, /landscape, /encapsulated, language_level=2, /quiet xBot=0.055 yBot=0.06 xLen=0.18 yLen=0.18 xShi=0.00 yShi=0.00 cgText, /normal, 0.5,.0055, 'Wavelength ('+cgGreek('mu')+'m)', align=0.5, charsize=1.5, charthick=2 cgText, /normal, 0.02, 0.5, 'Reflectance (normalized to Vis)',orientation=90, align=0.5, charsize=1.5, charthick=2 xTicks=replicate(' ',10) xRang=[0.3,2.4] yRang=[0.3,2.2] norma = where( demeo.wave ge 0.55 and demeo.wave le 0.85 ) ;--III.2-- Sub-panel: one for each class for kC=0, demeo.N-1 do begin ;--III.2.1-- Plot position xPos = kC mod 5 yPos = (kC / 5) if xPos eq 0 then begin yTicks = string([0.5,1,1.5,2.],format='(F3.1)') endif else yTicks=replicate(' ',10) if yPos eq 4 then begin xTicks = string([0.5,1,1.5,2.,2.5],format='(F3.1)') endif else xTicks=replicate(' ',10) pPos = [xBot + xPos*(xLen+xShi), $ yBot + 4*(yLen+yShi)- yPos*(yLen+yShi), $ xBot + xPos*(xLen+xShi) + xLen, $ yBot + 4*(yLen+yShi)- yPos*(yLen+yShi) + yLen] ;--III.2.2-- Create Plot cgPlot, demeo.wave, demeo.class[kC].spec, /NoData, /NoErase, $ xStyle=1, xRange=xRang, xTickInt=0.5, xTickName=xTicks, xMinor=5, $ yStyle=1, yRange=yRang, yTickInt=0.5, yTickName=yTicks, yMinor=5, $ xTickLen=0.04, $ yTickLen=0.03, $ position=pPos, charSize=1. ;--III.2.3-- Plot DeMeo Spectra demeo.class[kC].spec /= mean(demeo.class[kC].spec[norma]) range=where( demeo.wave ge 0.35 and demeo.wave le 2.4 ) xClass = [ reform(demeo.wave[range]), $ reform(reverse(demeo.wave[range]))] yClass = [ reform(demeo.class[kC].spec[range]-demeo.class[kC].dev[range]), $ reform(demeo.class[kC].spec[reverse(range)]+demeo.class[kC].dev[reverse(range)]) ] cgColorFill, xClass, yClass, color='grey' cgPlot, /over, demeo.wave, demeo.class[kC].spec cgPlot, /over, xClass, yClass, color='dark grey' ;--III.2.4-- Overplot Photometry cgErrPlot, filtWave, taxoEuclid[kC].color.ref-taxoEuclid[kC].color.unc, $ taxoEuclid[kC].color.ref+taxoEuclid[kC].color.unc cgPlot, /over, filtWave, taxoEuclid[kC].color.ref, psym='filled circle' cgText, 0.4,1.85, demeo.class[kC].name, charsize=1.5, charthick=2 endfor ;--III.3-- Filter Transmission kC=demeo.N ;--III.3.1-- Plot position xPos = kC mod 5 yPos = (kC / 5) pPos = [xBot + xPos*(xLen+xShi), $ yBot + 4*(yLen+yShi)- yPos*(yLen+yShi), $ xBot + xPos*(xLen+xShi) + xLen, $ yBot + 4*(yLen+yShi)- yPos*(yLen+yShi) + yLen] ;--III.3.2-- Create Plot cgPlot, demeo.wave, demeo.class[0].spec, /NoData, /NoErase, $ xStyle=1, xRange=xRang, xTickInt=0.5, xTickName=xTicks, xMinor=5, $ yStyle=1, yRange=[0,1], yTickInt=0.2, yTickName=yTicks, yMinor=4, $ xTickLen=0.04, $ yTickLen=0.03, $ position=pPos, charSize=1. cgAxis, xAxis=0, yaxis=1, charSize=1. ;--III.3.3-- Plot filters for kFilt=0, nbFilt-1 do begin cgPlot, /over, filt[kFilt].wave, filt[kFilt].trans, color='grey' cgText, /data, filtWave[kFilt], max(filt[kFilt].trans)+0.05, filtName[kFilt], align=0.5, color='grey' endfor cgText, /data, 0.35,.85, 'Filter transmission', charsize=1.5, charthick=2 cgPS_close, /png, Delete_PS=0 endif end