;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- I -- Initialization And Input Verification -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;-What to do ; checkFrac = 01 ;-Check fraction within Euclid RS ; ecExtent = 0 ; exOnlyFig = 0 ;---------- Directories spawn, 'hostname', host case strTrim(host) of 'hyperion': dirEuclid = '/observ/euclid/' 'endymion': dirEuclid = '/home/bcarry/work/data/euclid/' else: stop endcase dirFilter = dirEuclid+'filters/' dirTaxo = dirEuclid+'taxonomy/' dirStat = dirEuclid + 'stat/' dirRate = dirEuclid + 'rate/' dirFrac = dirEuclid + 'fraction/' dirSSO = dirEuclid + 'ssos/' dirExten = dirEuclid + 'exten/' dirRS = dirEuclid + 'rs/' fileCal = 'calib.sch' ;--- survey limits maxEc = 30 limEcl = 15 limGal = 20. band = 5. ;Time = 2020-01-31T00:00:00 ;RA/DEC from Euclid at 90 Elong = 14 37 36.54012 -09 14 23.0000 ra90 = ten(14,37,36.5)*15. mod 180 ; rs=euclidReadRS( dirRS+'rs.csv' ) ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- II -- SSO populations -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--II.1-- Read SSO populations readcol, dirEuclid+'pop', delimiter=',', $ format='(A,I1,F4.1,F4.1,F4.1,F4.1,F3.1,F3,A,A)', $ popName, popMain, popHmin, popHmax, xMin, xMax, yMin, yMax, popC, popS, /Silent popName = strtrim(popName,2) nbPop=n_elements(popName) print, 'Populations considered: ('+strtrim(string(nbPop),2)+'): ', popName ;--II.2-- Read expected number of SSO at Euclid limiting mag (from euclid-stat.pro) readcol, dirStat+'euclid-stat.csv', delimiter=',', /Silent, $ statName, statF, statMin, stat25, stat50, stat75, statMax, format='(A,F,F,F,F,F,F)' ; totalNumber = total(nbAvail) ;--II.2-- Read expected number of SSO at Euclid limiting mag (from euclid-stat.pro) readcol, dirStat+'euclid-disco.csv', delimiter=',', /Silent, $ discoName, discoF, discoMin, disco25, disco50, disco75, discoMax, format='(A,F,F,F,F,F,F)' ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- III -- Euclid Reference Survey & Epochs -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--III.1 -- Survey definitions cal = euclidReadRS( dirRS+fileCal ) nbCal = n_elements( cal.id ) ;--III.2 -- Time of Ephemeris readcol, dirEuclid+'time.sso', ep, format='(A)', /silent nbEp = n_elements( ep ) ;stop ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- IV -- Compute the number of SSO toward Ecliptic plane -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--IV-1-- Output arrays nbEc = round(maxEc)+1 iLim = maxEc - indgen(nbEc) stat = lonarr(nbPop+1,nbEc,5) frac = fltarr(nbPop+1,nbEc,5) for kPop=0, nbPop-1 do begin ;--IV.2.1-- Define file suffix for each population case popName[kPop] of 'NEA': suffix ='nea' 'Aten': suffix = 'nea-aten' 'Apollo': suffix = 'nea-apollo' 'Amor': suffix = 'nea-amor' 'MC': suffix = 'mcs' 'MB': suffix = 'mba' 'Hungaria': suffix = 'mba-hun' 'IMB': suffix = 'mba-imb' 'MMB': suffix = 'mba-mmb' 'OMB': suffix = 'mba-omb' 'Cybele': suffix = 'mba-cyb' 'Hilda': suffix = 'mba-hil' 'Trojan': suffix = 'jta' 'Centaur': suffix = 'cen' 'KBO': suffix = 'kbo' 'Detached': suffix = 'kbo-detached' 'SDO': suffix = 'kbo-sdo' 'Resonant': suffix = 'kbo-res' 'Inner Classical Belt': suffix = 'kbo-icb' 'Main Classical Belt': suffix = 'kbo-mcb' 'Outer Classical Belt': suffix = 'kbo-ocb' 'Comet': suffix = 'com' endcase ; case popName[kPop] of ; 'NEA': suffix ='nea' ; 'Aten': suffix = 'nea-aten' ; 'Apollo': suffix = 'nea-apollo' ; 'Amor': suffix = 'nea-amor' ; 'MC': suffix = 'mcs' ; 'MB': suffix = 'mba' ; 'Hungaria': suffix = 'mba-hun' ; 'IMB': suffix = 'mba-imb' ; 'MMB': suffix = 'mba-mmb' ; 'OMB': suffix = 'mba-omb' ; 'Cybele': suffix = 'mba-cyb' ; 'Hilda': suffix = 'mba-hil' ; 'Trojan': suffix = 'jta' ; 'Centaur': suffix = 'cen' ; 'KBO': suffix = 'kbo' ; 'Classical': suffix = 'kbo-classical' ; 'SDO': suffix = 'kbo-sdo' ; 'Comet': suffix = 'com' ; endcase ;--V.3-- Loop over epochs for kEp=0, nbEp-1 do begin ;--V.3.1-- Read SSO RA/Dec long/lat at current epoch if suffix ne 'com' then $ readcol, dirSSO+suffix+'-'+ep[kEp]+'.csv', delimiter=',', /Silent, $ id1, ra1, dec1, d1, dra1, ddec1, h1, g1, class1, name1, glon1, glat1, elong1, elat1, $ format='(I,F,F,F,F,F,F,F,A,A,F,F,F,F)' $ else $ readcol, dirSSO+suffix+'-'+ep[kEp]+'.csv', delimiter=',', /Silent, $ id1, ra1, dec1, d1, dra1, ddec1, h1, r1, d1, a1,a2,a3,class1, iau1, name1, glon1, glat1, elong1, elat1, $ format='(I,F,F,F,F,F,F,F,F,F,F,F,A,A,A,F,F,F,F)', skipline=1 nbSSO = n_elements(id1) for kEc=0, nbEc-1 do begin noGal = where( abs(gLat1) ge limGal, nbGal ) noEcl = where( abs(eLat1) ge iLim[kEc], nbEcl ) surv = where( abs(gLat1) ge limGal and abs(eLat1) ge iLim[kEc], nbSurv, ncomp=nbCom ) stat[kPop,kEc,*] = [nbSSO, nbGal, nbEcl, nbSurv, nbcom] frac[kPop,kEc,*] = [nbSSO, nbGal, nbEcl, nbSurv, nbcom]*1./nbSSO stat[nbPop,kEc,*] += [nbSSO, nbGal, nbEcl, nbSurv, nbcom] endfor forprint, iLim, stat[kPop,*,3], 100.*frac[kPop,*,3], $ stat[kPop,*,2], 100.*frac[kPop,*,2], $ format='(I2,2x,I7,2x,F5.2,2x,I7,2x,F7.2)', textout=dirExten+popName[kPop]+'.dat', $ /Silent, /NoComment endfor for kEc=0, nbEc-1 do $ frac[nbPop,kEc,*] = 1.*stat[nbPop,kEc,*]/stat[nbPop,kEc,0] endfor cgPS_open, Filename=dirExten+'Euclid-Exten.eps', /metric, /decomposed, /encapsulated, $ xSize=35, ySize=18.9, language_level=2, /quiet xRang=[0,25] cgPlot, 0,0, /NoData, /Normal, $ xStyle=1, xRange=xRang, $ yStyle=1, yRange=[0, 100], $ xTitle='Ecliptic latitude threshold (!Uo!N)', $ yTitle='Fraction of population (%)', $ xTickInterval=5, xMinor=5, $ yTickInterval=20, yMinor=4, $ position=[0.08,0.105,0.96,0.98] xKey = 18 xLen = 1.5 yKey = 65 + indgen(nbPop)*5 fracSel = 3 pEuclid=where( iLim eq limEcl) pMax = max(100*frac[*,pEuclid,fracSel]) ; cgPlot, /OverPlot, [limEcl,limEcl], [pMax+3, 80], color='Gray', linestyle=2 cgPlot, /OverPlot, [limEcl,limEcl], [3, 97], color='Gray', linestyle=2 cgText, limEcl-0.1, pMax+5, 'Limit of Euclid survey', color='Gray', $ orient=90 for kPop=0, nbPop-1 do begin cgPlot, /OverPlot, iLim, 100*frac[kPop,*,fracSel], color=popC[kPop] cgPlot, /OverPlot, iLim, 100*frac[kPop,*,fracSel], color=popC[kPop], psym=popS[kPop] cgPlot, /OverPlot, xKey+[0,xLen], yKey[kPop]+[0,0], color=popC[kPop] cgPlot, /OverPlot, xKey+0.5*xLen, yKey[kPop], color=popC[kPop], psym=popS[kPop] cgText, xKey+1.1*xLen, yKey[kPop]-2, popName[kPop] endfor ;---- WHOLE population of course follows MBA ; cgPlot, /OverPlot, iLim, 100*frac[nbPop,*,fracSel], color='Dark gray' xNum = [5, 10, 15] xNum = [0, 3, 6, 9, 12, 15] for kN=0, n_elements(xNum)-1 do begin pNum = where( iLim eq xNum[kN]) numObs = frac[nbPop,pNum,fracSel]*total(stat50);totalNumber numE = strtrim(string(numObs, format='(E7.0)'),2) numN = strmid(numE,0,1) expN = strmid(numE,5,1) cgText, xNum[kN]-0.1, 95, numN+'.10!U'+expN, align=1, orient=90 endfor cgPS_close, /PNG, delete_PS=0 end