root = '/home/bcarry/work/mining/vista/' dirIn = root+'input/' readcol, root+'vhs.list', list, format='(A)', /Silent nbSSO = n_elements(list) print, nbSSO fColor= [ 'Red', 'Blue', 'Green', 'Black' ] fSymb = ['OpenCircle', 'FilledSquare', 'FilledCircle', 'OpenSquare'] plotMag = 01 plotCoord = 0 ;-Holmberg2006 sunVmJ2 = 1.151 ; +/- 0.035 sunVmH2 = 1.409 ; +/- 0.035 sunVmK2 = 1.505 ; +/- 0.041 ;-Popescu2016 sunYmJ = 0.196 ; +/- ? sunYmK = 0.532 ; +/- ? sunJmH = 0.255 ; +/- ? sunJmK = 0.336 ; +/- ? sunHmK = 0.082 ; +/- ? col = fltarr(nbSSo,4) unc = fltarr(nbSSo,4) stat= intarr(nbSSo) void = -9.9999949E8 for i=0, nbSSO-1 do begin readcol, dirIn+list[i]+'.csv', format='(D,F,F,F,F,F,F,F,F,F,F)', $ date, ra, dec, y, yu, j, ju, h, hu, k, ku, /Silent s = strSplit(list[i],'_',/Extract) ssoId = s[0] ssodnet = voSsODNet_resolver(ssoId,/Quiet) dimS = size(ssodnet) if valid_num(ssoId) then begin ssoNum =round(float(ssoId)) if dims[dims[0]+1] eq 8 then ssoName=ssodnet.name else ssoName='' endif else begin ssoName=strTrim(ssoId,2) if isnumeric(ssoName) then ssoName=strmid(ssoName,0,4)+' '+strmid(ssoName,4,10) if dims[dims[0]+1] eq 8 then begin s=strSplit(ssodnet.others,',',/Extract) if valid_num(s[0]) then ssoNum= round(float(s[0])) endif else ssoNum=0 endelse nbObs = n_elements(ep) pY = where( y ne void, nY) pJ = where( j ne void, nJ) pH = where( h ne void, nH) pK = where( k ne void, nK) count=[ny, nj, nh, nk] filt = where( count ne 0, nbCol ) stat[i] = nbCol if plotMag eq 1 then begin temps = (date-min(date))*24.*60 cgPlot, temps, dec, /NoData, yRange=[5,25], xRange=[-0.001, max(temps)] if nY ne 0 then cgPlot, /OverPlot, temps, y, psym=fSymb[0], color=fColor[0] if nJ ne 0 then cgPlot, /OverPlot, temps, j, psym=fSymb[1], color=fColor[1] if nH ne 0 then cgPlot, /OverPlot, temps, h, psym=fSymb[2], color=fColor[2] if nK ne 0 then cgPlot, /OverPlot, temps, k, psym=fSymb[3], color=fColor[3] endif muY=0 & muJ=0 & muH=0 & muK=0 stdY=0 & stdJ=0 & stdH=0 & stdK=0 if nY ne 0 then muY = mean(y) if nJ ne 0 then muJ = mean(j) if nH ne 0 then muH = mean(h) if nK ne 0 then muK = mean(k) if nY ne 0 then stdY = stddev(y) if nJ ne 0 then stdJ = stddev(j) if nH ne 0 then stdH = stddev(h) if nK ne 0 then stdK = stddev(k) col[i,*] = [muY, muJ, muH, muK] unc[i,*] = [stdY, stdJ, stdH, stdK] ; print, list[i], ny, nj, nh, nk, nbCol, $ ; format='(A-20, 3x,I2,2x,I2,2x,I2,2x,I2,4x,I2)' if plotCoord eq 1 then begin cgPlot, ra, dec, /NoData if nY ne 0 then cgPlot, /OverPlot, ra, dec, psym=fSymb[0], color=fColor[0] if nJ ne 0 then cgPlot, /OverPlot, ra, dec, psym=fSymb[1], color=fColor[1] if nH ne 0 then cgPlot, /OverPlot, ra, dec, psym=fSymb[2], color=fColor[2] if nK ne 0 then cgPlot, /OverPlot, ra, dec, psym=fSymb[3], color=fColor[3] endif if nbObs gt 1 then begin coef = regress( ra, dec, yfit=fitDec ) rmsDec = sqrt( total( (dec-fitDec)^2. ) / nbObs ) if plotCoord eq 1 then cgPlot, /OverPlot, ra, fitDec coef = regress( dec, ra, yfit=fitRA ) rmsRA = sqrt( total( (ra-fitRA)^2. ) / nbObs ) ; cgPlot, /OverPlot, fitRA, dec, linestyle=2, color='navy' endif else begin rmsRA=0 rmsDec=0 endelse print, ssoNum, ssoName, ny, nj, nh, nk, nbCol, rmsRA*3600, rmsDec*3600, $ format='(i6,1x,A-15, 3x,I2,2x,I2,2x,I2,2x,I2,4x,I2,4x,F6.2,4x,F6.2)' endfor cgHistoPlot, stat end