pro oc_tyc2_hd_test ;+ ; NAME: ; oc_tyc2_hd_test ; ; PURPOSE: (one line) ; Test end-to-end TYC2 search and cross-matching with HD. ; ; DESCRIPTION: ; Makes plot showing positions of HD and TYC2 stars. ; ; Takes several minutes to run. ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; oc_tyc2_hd_test ; ; INPUTS: ; None ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; None ; ; KEYWORD OUTPUT PARAMETERS: ; None ; ; OUTPUTS: ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; None ; ; EXAMPLE: ; oc_tyc2_hd_test ; ; MODIFICATION HISTORY: ; Written 30-Nov-2005 by Henry Throop, SwRI. Based on oc_test_hd_tyc2, ; which is the same in opposite direction. ; Modified 7-Dec-2005 by HBT. Minor changes. ; Modified 23-Feb-2006 by HBT. Improved documentation and formatting. ; Modified 24-Mar-2006 by HBT. Renamed oc_test_tyc2_hd -> oc_tyc2_hd_test. ;- ra_test = 0.5d dec_test = 0.5d radius_test = 0.1d color_hd = 1 color_tyc2 = 2 line_dot = 1 sym_dot = 3 sym_square = 6 sym_plus = 1 ; Search the TYC2 catalog and return a list of matching ID's tyc2 = oc_search_pos_single_tyc2(ra_test, dec_test, $ radius_test, nstars) ; Get the HD ID's for the supplied TYC2 ID's tyc2_hd = oc_getrec_tyc2_hd(tyc2=tyc2.id) ; Extract only the HD stars which match. This step is optional, but speeds ; things up. tyc2_hd = tyc2_hd[where(tyc2_hd.hd ne 0)] ; Look up the full HD records hd = oc_getstar_hd(tyc2_hd.hd, nstars=count_hd) ; Plot the TYC2 stars colors xrange=[minval(tyc2.ra > 0d), maxval(tyc2.ra > 0d)] yrange=[minval(tyc2.dec > 0d ), maxval(tyc2.dec > 0d)] plot, tyc2.ra[*], tyc2.dec[*], psym=3, xrange=xrange, yrange=yrange, $ xtitle = 'RA [rad]', ytitle = 'Dec [rad]', $ title = 'Radius = ' + st(radius_test) + ' rad: ' + st(nstars) + $ ' TYC2 stars, ' + st(count_hd) + ' HD stars' oplot, tyc2.ra[*], tyc2.dec[*], psym=3, color=color_tyc2 ; Overplot the HD stars do_box = 1 if (do_box) then oplot, tyc2.ra[*], tyc2.dec[*], psym=sym_square, $ color=color_tyc2, thick=1 oplot, hd.ra[*], hd.dec[*], psym=sym_plus, color=color_hd oplot, tyc2.ra[*], tyc2.dec[*], psym=3, color=color_tyc2 legend, /top, /right, box=0, ['HD', 'TYC2'], $ color=[color_hd, color_tyc2], linesty = line_dot ; See if any stars are in TYC2 Supplement but not main TYC2 print, 'Found ' + st(nstars) + ' TYC2 stars at RA = ' + st(ra_test) + $ ', dec = ' + st(dec_test) + ', radius = ' + st(radius_test) + ' radians.' print, 'Found ' + st(count_hd) + ' HD stars.' ; where_suppl = where(tyc2_hd.f_tyc ne ' ', n) ; if (n gt 0) then print, 'Stars in TYC2 Supplement but not TYC2: ' + string( (tyc2_hd.tyc)[where_suppl] ) print print, 'HBT benchmark 30-Nov-2005: 4558 TYC2 stars, 236 HD stars, ' + $ 'at HD RA = 0.5, dec = 0.5, radius = 0.1 radians' print, 'HBT benchmark timing: 2 minutes, 29 seconds' stop end