; docformat = 'rst' ;- function readPhobos, path ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- I -- Initialization And Input Verification -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--I.1-- Set IDL Compilation Options --------------------------------------------------------- COMPILE_OPT hidden, idl2 if not keyword_Set(path) then path='/data/colors/mmx/' ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- II -- Read Phobos Reference spectra -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; wMin=0.53 wMax=1. wStep=0.002 nbWave = (wMax-wMin)/wStep + 1 wave = wMin + (wMax-wMin)*findgen(nbWave)/nbWave waveNorm=where( wave ge 0.54 and wave le 0.56 ) ;--II.1-- Ground-based Spectra: Fraeman+2014 ----------------------------------------------- readcol, path+'phobos_gb.csv', wGB, blue, red, delimiter=',', /Silent ;WAVE in MICRON gbName = ['GB Blue','GB Red'] gb_blue=interpol(blue, wGB, wave) gb_red=interpol(red, wGB, wave) miss=where( wave ge 0.89 ) valid=where( wave le 0.89 ) coefRed=linfit(wave[valid], gb_red[valid]) gb_red[miss] = coefRed[0]+ coefRed[1]*wave[miss] gb_red *= 0.055/mean( gb_red[waveNorm] ) valid=where( (wave ge 0.8 and wave le 0.89) or (wave le 0.57)) coefBlue=linfit(wave[valid], gb_blue[valid]) gb_blue[miss] = coefBlue[0]+ coefBlue[1]*wave[miss] gb_blue *= 0.08/mean( gb_blue[waveNorm] ) ; cgPlot, wGB, blue, color='blue', yr=[0.6,1.4], xr=[0.5,1] ; cgPlot, /OverPlot, wGB, red, color='red' ; ; cgPlot, /OverPlot, wave, gb_red, lineStyle=2, color='orange' ; cgPlot, /OverPlot, wave, gb_blue, lineStyle=2, color='cornflower blue' ; ; cgPlot, /OverPlot, wave, coefRed[0]+ coefRed[1]*wave, lineStyle=1, color='grey' ; cgPlot, /OverPlot, wave, coefBlue[0]+ coefBlue[1]*wave, lineStyle=1, color='grey' ; ; stop ;--II.2-- Units from CRISM/MRO: Pajola+2018 ------------------------------------------------ readcol, path+'phobos_cluster.csv', wC,c1,c2,c3,c4,c5,c6, delimiter=',', /Silent ;WAVE in MICRON cName = ['Cluster 1', 'Cluster 2', 'Cluster 3', 'Cluster 4', 'Cluster 5', 'Cluster 6'] c_1=interpol(c1, wC, wave) c_2=interpol(c2, wC, wave) c_3=interpol(c3, wC, wave) c_4=interpol(c4, wC, wave) c_5=interpol(c5, wC, wave) c_6=interpol(c6, wC, wave) miss=where( wave ge 0.9 ) valid=where( wave ge 0.72 and wave le 0.9 ) coefC1=linfit(wave[valid], c_1[valid]) c_1[miss] = coefC1[0]+ coefC1[1]*wave[miss] coefC2=linfit(wave[valid], c_2[valid]) c_2[miss] = coefC2[0]+ coefC2[1]*wave[miss] coefC3=linfit(wave[valid], c_3[valid]) c_3[miss] = coefC3[0]+ coefC3[1]*wave[miss] coefC4=linfit(wave[valid], c_4[valid]) c_4[miss] = coefC4[0]+ coefC4[1]*wave[miss] coefC5=linfit(wave[valid], c_5[valid]) c_5[miss] = coefC5[0]+ coefC5[1]*wave[miss] coefC6=linfit(wave[valid], c_6[valid]) c_6[miss] = coefC6[0]+ coefC6[1]*wave[miss] c_1 *= 0.073/ mean( c_1[waveNorm] ) c_2 *= 0.072/ mean( c_2[waveNorm] ) c_3 *= 0.071/ mean( c_3[waveNorm] ) c_4 *= 0.069/ mean( c_4[waveNorm] ) c_5 *= 0.067/ mean( c_5[waveNorm] ) c_6 *= 0.065/ mean( c_6[waveNorm] ) ; ; cgPlot, wC, c1, color='blue', psym='filled circle', yr=[0,.035], xr=[0.5,1] ; cgPlot, /OverPlot, wC, c2, psym='filled circle', color='red' ; cgPlot, /OverPlot, wC, c3, psym='filled circle', color='green' ; cgPlot, /OverPlot, wC, c4, psym='filled circle', color='purple' ; cgPlot, /OverPlot, wC, c5, psym='filled circle', color='light grey' ; cgPlot, /OverPlot, wC, c6, psym='filled circle', color='cornflower blue' ; ; cgPlot, /OverPlot, wave, c_1, lineStyle=2, color='cornflower blue' ; cgPlot, /OverPlot, wave, c_2, lineStyle=2, color='orange' ; cgPlot, /OverPlot, wave, c_3, lineStyle=2, color='orange' ; cgPlot, /OverPlot, wave, c_4, lineStyle=2, color='orange' ; cgPlot, /OverPlot, wave, c_5, lineStyle=2, color='orange' ; cgPlot, /OverPlot, wave, c_6, lineStyle=2, color='orange' ; cgPlot, /OverPlot, wave, coefC1[0]+ coefC1[1]*wave, lineStyle=3, color='grey', thick=3 ; cgPlot, /OverPlot, wave, coefC2[0]+ coefC2[1]*wave, lineStyle=3, color='grey', thick=3 ; cgPlot, /OverPlot, wave, coefC3[0]+ coefC3[1]*wave, lineStyle=3, color='grey', thick=3 ; cgPlot, /OverPlot, wave, coefC4[0]+ coefC4[1]*wave, lineStyle=3, color='grey', thick=3 ; cgPlot, /OverPlot, wave, coefC5[0]+ coefC5[1]*wave, lineStyle=3, color='grey', thick=3 ; cgPlot, /OverPlot, wave, coefC6[0]+ coefC6[1]*wave, lineStyle=3, color='grey', thick=3 ; ; ;--II.3-- Martian Meteorites from Pierre Beck ---------------------------------------------- readcol, path+'NWA817_slab_filtered.txt', w1,r1, delimiter=' ', /Silent ;WAVE in NM w1/=1000. readcol, path+'NWA8159_poudre_filtered.txt', w2,r2, delimiter=' ', /Silent ;WAVE in NM w2/=1000. readcol, path+'NWA1068_slab1_corroffset_filtered.txt', w3,r3, delimiter=' ', /Silent ;WAVE in NM w3/=1000. rName=['NWA817','NWA8159','NWA1068'] r_1=interpol(r1, w1, wave) r_2=interpol(r2, w2, wave) r_3=interpol(r3, w3, wave) ; r_1 /= mean( r_1[waveNorm] ) ; r_2 /= mean( r_2[waveNorm] ) ; r_3 /= mean( r_3[waveNorm] ) ; cgPlot, w1, r1, color='blue', xr=[0.2,1] ;, yr=[0,.035] ; cgPlot, /OverPlot, wave, r_1, color='red', lineStyle=2, thick=3 ;stop ; cgPlot, w2, r2, color='blue' ; cgPlot, /OverPlot, wave, r_2, color='red', lineStyle=2, thick=3 ;stop ; cgPlot, /OverPlot, w3, r3, color='blue' ; cgPlot, /OverPlot, wave, r_3, color='red', lineStyle=2, thick=3 nbClass=6+2+3 phobos={ N:nbClass, wave: wave, $ class: replicate( {name:'', spec:fltarr(nbWave), dev:fltarr(nbWave), WavelengthUnit:'micron', $ type:0, $ color:'Black', sym:'o', size:1.0, style:0, thick:1.0}, nbClass ) } phobos.class[0].spec=gb_red phobos.class[0].name='GB Red' phobos.class[0].color='r' phobos.class[1].spec=gb_blue phobos.class[1].name='GB Blue' phobos.class[1].color='b' phobos.class[2].spec=c_1 phobos.class[2].name='Cluster 1' phobos.class[2].color='darkmagenta' phobos.class[3].spec=c_2 phobos.class[3].name='Cluster 2' phobos.class[2].color='cornflowerblue' phobos.class[4].spec=c_3 phobos.class[4].name='Cluster 3' phobos.class[4].color='lightsteelblue' phobos.class[5].spec=c_4 phobos.class[5].name='Cluster 4' phobos.class[5].color='Green' phobos.class[6].spec=c_5 phobos.class[6].name='Cluster 5' phobos.class[6].color='orange' phobos.class[7].spec=c_6 phobos.class[7].name='Cluster 6' phobos.class[7].color='brown' phobos.class[8].spec=r_1 phobos.class[8].name=rName[0] phobos.class[8].color='Black' phobos.class[9].spec=r_2 phobos.class[9].name=rName[1] phobos.class[9].color='Lightgrey' phobos.class[10].spec=r_3 phobos.class[10].name=rName[2] phobos.class[10].color='Grey' phobos.class[2:7].sym='s' phobos.class[8:10].sym='D' phobos.class[0].type=1 ;-Red phobos.class[1].type=2 ;-Blue phobos.class[2:7].type=3 ;-Clusters phobos.class[8:10].type=0 ;-Mars meteorites return, phobos end ; ;--II.4-- Set OutPut Structure ------------------------------------------------------------- ; ; ;--II.5-- For each Class, add Name, Spec, and Deviation ------------------------------------ ; taxo.class.name = classN ; taxo.class.spec = [ [avgA], [avgB], [avgC], [avgCb], [avgCg], [avgCgh], [avgCh], $ ; [avgD], [avgK], [avgL], [avgO], [avgQ], [avgR], [avgS], $ ; [avgSa], [avgSq], [avgSr], [avgSv], [avgT], [avgV], $ ; [avgX], [avgXc], [avgXe], [avgXk] ] ; taxo.class.dev = [ [errA], [errB], [errC], [errCb], [errCg], [errCgh], [errCh], $ ; [errD], [errK], [errL], [errO], [errQ], [errR], [errS], $ ; [errSa], [errSq], [errSr], [errSv], [errT], [errV], $ ; [errX], [errXc], [errXe], [errXk] ] ;end