;+ ; NAME: ;; oc_getstar_hd_test ; ; PURPOSE: (one line) ; Tests the oc_getstar_hd routines and compares to Vizier results. ; ; DESCRIPTION: ; Gets the RA/DEC for a number of HD stars. Precesses them and ; prints their coordinates in J2000 and B1900, in d:m:s and d:m.m. ; These can be compared to the identical output from Vizier, to ; verify that precession is done properly. ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; oc_getstar_hd_test ; ; INPUTS: ; None ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; None ; ; KEYWORD OUTPUT PARAMETERS: ; None ; ; OUTPUTS: ; None ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; None ; ; EXAMPLE: ; oc_getstar_hd_test ; ; MODIFICATION HISTORY: ; Written 20-Oct-2005 by Henry Throop, SwRI ; Modified 23-Feb-2006 by HBT. Improved documentation and formatting. ;;- ; Sample output for ids = [1000] ; > HD 1000 ; > RA = 0h14.37818, dec = -21d11.63297 (J2000, d:m) ; > RA = 0h9.3000002, dec = -21d45 (B1900, d:m) ; > RA = 0h14:22.690771, dec = -21d11:37.978214 (J2000, d:m:s) ; ; Vizier gives the following results for HD 1000 ;> Full_r _RAJ2000 _DEJ2000 HD DM RAB1900 DEB1900 Ptm Ptg SpType Tycho ;> arcmin "h:m:s" "d:m:s" "h:m:s" "d:m:s" mag mag ;> 1 0.5 00 14.4 -21 12 1000 BD-21 17 00 09.3 -21 45 6.85 7.40 F8 Tycho ;> ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ; ; This confirms that oc_getstar_hd is properly reading the HD catalog and performing 1900->2000 precession. ; ; HBT 20-Oct-2005 ; pro oc_getstar_hd_test ; HD numbers to check ids = [1,10, 100,1000, 10000d, 100000d] s = oc_getstar_hd(ids) ; Loop over all of the requested stars for i = 0, sizex(ids)-1 do begin ; Get the 1900 coordinates from the raw HD catalog hd = s[i].hd ra_1900 = (hd.rah + (hd.radm * 0.1)/60d ) * (2d*!dpi/24d) ; RA, B1900, radians dec_1900 = (hd.de eq '-' ? -1d : 1d) * $ ( hd.ded + (hd.dem/60d)) * (2d*!dpi/360d) ; Dec, B1900, radians sign_1900 = 1d radtohms, ra_1900, ra_hh_1900, ra_mm_1900, ra_ss_1900 radtodms, dec_1900, sign_1900, dec_dd_1900, dec_mm_1900, dec_ss_1900 ; Get the 2000 coordinates, which have already been precessed ra = s[i].ra dec = s[i].dec sign = 1d radtohms, ra, ra_hh, ra_mm, ra_ss radtodms, dec, sign, dec_dd, dec_mm, dec_ss ; Print out both 1900 and 2000 coordinates print print, 'HD ' + st(ids[i]) print, 'RA = ' + st(ra_hh) + 'h' + st(ra_mm+ra_ss/60d) + $ ', dec = ' + st(sign*dec_dd) + 'd' + st(dec_mm+dec_ss/60d) + $ ' (J2000, d:m)' print, 'RA = ' + st(ra_hh_1900) + 'h' + $ st(ra_mm_1900+ra_ss_1900/60d) + ', dec = ' + $ st(sign_1900*dec_dd_1900) + 'd' + $ st(dec_mm_1900+dec_ss_1900/60d) + ' (B1900, d:m)' print, 'RA = ' + st(ra_hh) + 'h' + st(ra_mm) + ':' + st(ra_ss) + $ ', dec = ' + st(sign*dec_dd) + 'd' + st(dec_mm) + ':' + st(dec_ss) + $ ' (J2000, d:m:s)' end stop end