dirEuclid = '/observ/euclid/' dirFilter = dirEuclid+'filters/' dirTaxo = dirEuclid+'taxonomy/' doPLOT=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 cClass=['A','B','C','Cb','Cg','Cgh','Ch','D','K','L','O','Q','R','S','Sa','Sq','Sqw','Sr','Srw','Sv','Svw','Sw','T','V','Vw','X','Xc','Xe','Xk'] cID =[ 1 , 2 , 3 , 3 , 3 , 3 , 3 , 4 , 5 , 6 , 8 , 7 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 9 ,11 ,11 ,10 ,10 ,10 ,10 ] cLabel=['U','A','B','C','D','K','L','Q','S','T','X','V'] ;--- Read Bus-DeMeo average spectra confAstroIM= initIDL() confCatalog= initIDL(confAstroIM.soft.catalog, /CATALOG) path = confCatalog.surface.taxo list='listspectra.csv' file = path + list readcol, file, fileName, ssoNum, ssoName, ssoClass, ssoDate, $ delimiter=',', format='(A,L,A,A,A)', /silent nbSSO=n_elements(fileName) fileName = strtrim(fileName,2) ssoName = strtrim(ssoName,2) ssoClass = strtrim(ssoClass,2) ;--- Convert average to colors readcol, dirFilter+'EuclidVisFilterMin.txt', w, t, /SILENT ref = {wave:w*waveToMicron, trans:t} taxoEuclid = replicate({class:'', color:replicate({ref:0., unc:0.},nbFilt)},nbSSO) taxoEuclid.class = ssoClass filt=replicate(ref,nbFilt) for kFilt=0, nbFilt-1 do begin print, filtName[kFilt] readcol, dirFilter+'Euclid'+filtName[kFilt]+'FilterMin.txt', w, t, /SILENT ;----- BAD J FIlter 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 filt[kFilt].wave=w*waveToMicron filt[kFilt].trans= t cur = {wave:w*waveToMicron, trans:t} noZero = where( cur.trans ne 0 ) centWave[kFilt] = mean( cur.wave[noZero] ) for k=0, nbSSO-1 do begin readcol, path+fileName[k], wave, sref, sunc, format='(F,F,F)', /SILENT demeo = { N:1, wave:wave, class: {name:ssoClass[k], spec:sref, dev:sunc} } conv = convertTaxoToColor( demeo, cur, ref ) taxoEuclid[k].color[kFilt].ref = conv.ref taxoEuclid[k].color[kFilt].unc = conv.unc endfor endfor filtWave = centWave uniqClass = ssoClass[uniq( ssoClass,sort(ssoClass)) ] classId = intarr(nbSSO) complexId= intarr(nbSSO) compLabel=strarr(nbSSO) for k=0, nbSSO-1 do begin classId[k] = where(ssoClass[k] eq uniqClass) complexId[k] = cID[ where( ssoClass[k] eq cClass ) ] compLabel[k] = cLabel[ complexId[k] ] endfor col = taxoEuclid.color.ref unc = taxoEuclid.color.unc forprint, ssoNum, ssoName, ssoClass, $ col[0,*], col[1,*], col[2,*], col[3,*], $ unc[0,*], unc[1,*], unc[2,*], unc[3,*], $ classId, compLabel, complexId, $ format='(I-6,",",A-15,",",A-3,8(",",F7.4),",",I2,",",A1,",",I2)', $ textout=dirTaxo+'euclid-demeoColors.csv', $ comment='Num, Name, Class, rVIS, rY, rJ, rH, uVIS, uY, uJ, uH, classId,complex,complexId', $ /silent end