root='/data/kids/' dirSB = root + 'skybot/' file='kids_survey_with_JD.csv' readKids = 0 if readKids eq 1 or not keyword_set(ra) then $ readcol, root+file, ra,dec,ep,filter,mag,ID,PM,PMAlpha,PMDelta,MJD,iso, delimiter=',', /silent, format='(D,D,D,A,F,I,F,F,F,D,A)' ord=sort(mag) nbKids = n_elements(ra) sso = replicatE( {num:0L, name:'', $ ;-SSO: Number and NameEpoch: JD & ISO ra: {sex:[0,0,0.], dec:0.}, $ ;-RA: Sexagesimal & Decimal (EQ) dec:{sex:[0,0,0.], dec:0.}, $ ;-DEC: Sexagesimal & Decimal (EQ) lon:{sex:[0,0,0.], dec:0.}, $ ;-Longitude: Sexagesimal & Decimal (EC) lat:{sex:[0,0,0.], dec:0.}, $ ;-Latitude: Sexagesimal & Decimal (EC) class:'', mag:0., $ ;-Object class & Apparent Mag errpos:0., d:0., $ ;-Position: error and distance to center muRa:0., muDec:0., $ ;-Coordinates Apparent Rates dObs:0.D, dSun:0.d, $ ;-Range to observer and heliocentric distance phase:0., elong:0., $ ;-Phase angle & Solar elongation x:0.d, y:0.d, z:0.d, $ ;-Cartesian heliocentric position vx:0.d, vy:0.d, vz:0.d, $ ;-Cartesian heliocentric velocities ep:{jd:0.d,iso:''}}, nbKids ) MJDtoJD = 2400000.5d for k=0L, nbKids-1 do begin ; for i=5000L, nbKids-1 do begin ; k=ord[i] print, mag[k] loc = voSkybot_coneSearch( ra[k], dec[k], '30,s', iso[k], out='all', $ dump = dirSB+strTrim(string(k+1,format='(I6)'),2)+'.txt' ) if size(loc,/type) eq 8 then begin sso[k] = loc endif endfor ok=where(sso.ra.dec ne 0 and sso.dec.dec ne 0, nbOk ) okRA=where(sso.ra.dec ne 0, nbRA ) forprint, sso.num, sso.name, sso.mag, $ sso.ep.iso, sso.ep.jd, $ sso.ra.dec, sso.dec.dec, $ sso.lon.dec, sso.lat.dec, $ sso.muRA, sso.muDec, sso.phase, sso.elong, $ sso.dObs, sso.dSun, $ sso.class, sso.errpos, $ format='(I6,",",A-20,",",F5.2,",",'+$ 'A22,",",D16.8,",",'+$ 'F9.5,",",F9.5,",",F9.5,",",F9.5,",",'+$ 'F9.5,",",F9.5,",",F6.2,",",F6.2,",",'+$ 'F7.3,",",F7.3,",",A-15,",",F8.2)', $ subset=ok, textout=root+'info-skybot.csv', $ comment='Number, Name, V, ISO, JD, RA, Dec, Long, Lat, muRA, muDec, phase, elong, dObs, dSun, class, errPos' end