;+ ; NAME: ; oc_hd_tyc2_test ; ; PURPOSE: (one line) ; Test to validate that HD -> TYC2 ID's can be properly matched. ; ; DESCRIPTION: ; Tests end-to-end HD search and matching to TYC2. Makes a plot ; showing positions of HD and TYC2 stars. This is a very ; extensive test, which validates many many routines. ; ; Program oc_test_tyc2_hd tests this in the opposite direction. ; ; CATEGORY: ; Star catalogs. ; ; CALLING SEQUENCE: ; oc_hd_tyc2_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_hd_tyc2_test ; ; MODIFICATION HISTORY: ; Written 4-Nov-2005 by Henry Throop, SwRI ; Modified 15-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_hd_tyc2 -> oc_hd_tyc2_test ;- pro oc_hd_tyc2_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 HD catalog and return a list of matching ID's hd = oc_search_pos(ra_test, dec_test, radius_test, $ 'hd', nstars, method='SUBCAT', /VERB) ; Get the TYC2 ID's for the supplied HD ID's tyc2_hd = oc_getrec_tyc2_hd(hd=hd.id) ; Look up the full TYC2 records tyc2 = oc_getstar_tyc2(tyc2_hd.tyc, nstars=nstars_tyc2) ; Plot the HD stars colors xrange=[minval(hd.ra[*]), maxval(hd.ra[*])] yrange=[minval(hd.dec[*]), maxval(hd.dec[*])] plot, hd.ra[*], hd.dec[*], psym=sym_plus, xrange=xrange, yrange=yrange, $ xtitle = 'RA [rad]', ytitle = 'Dec [rad]', $ title = 'Radius = ' + st(radius_test) + ' rad: ' + st(nstars) + $ ' HD stars, ' + st(nstars_tyc2) + ' TYC2 stars' oplot, hd.ra[*], hd.dec[*], psym=sym_plus, color=color_hd ; Overplot the TYC2 stars do_box = 1 if (do_box) then oplot, tyc2.ra[*], tyc2.dec[*], $ psym=sym_square, color=color_tyc2, thick=1 oplot, tyc2.ra[*], tyc2.dec[*], psym=sym_dot, color=color_tyc2 oplot, hd.ra[*], hd.dec[*], psym=3, color=color_hd 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) + ' HD stars at RA = ' + st(ra_test) + $ ', dec = ' + st(dec_test) + ', radius = ' + st(radius_test) + ' radians.' print, 'Found ' + st(nstars_tyc2) + ' TYC2 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 4-Nov-2005: 234 HD stars, 233 TYC2 stars, ' + $ ' at HD RA = 0.5, dec = 0.5, radius = 0.1 radians' print, 'HBT benchmark timing: 19 seconds' stop end