;+ ; NAME: ; oc_search_pos_single_ucac2 ; ; PURPOSE: (one line) ; Searches around a given position in the UCAC2 catalog. ; ; DESCRIPTION: ; This routine is a wrapper to call oc_search_pos_fullcat. ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; oc_search_pos_single_ucac2, RA, DEC, RADIUS, NSTARS, _extra=extra ; ; INPUTS: ; RA -- Right ascension of center of search position. Radians, J2000. ; DEC -- Declination of center of search position. Radians, J2000. ; RADIUS -- Search radius. Radians. ; ; Inputs are single values, not arrays. ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; CATALOG= -- Name of the catalog to use; e.g., 'HD', 'TY2', 'UCAC2'. ; Defaults to 'HD' if not set. ; /VERBOSE -- If set, print error messages to screen. ; ; KEYWORD OUTPUT PARAMETERS: ; None ; ; OUTPUTS: ; result -- Array of structures [nstars], with each element being a ; fully-populated star structure containing RA, Dec, magnitude, etc. ; NSTARS -- Number of stars found ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; The proper environment variable must be set for the catalog called. ; $UCAC2_PATH -- For UCAC2 catalog ; ; EXAMPLE: ; print, (oc_search_pos_single_ucac2(0.1, 0.1, 0.01, nstars)).ID ; ; MODIFICATION HISTORY: ; Written 30-Jan-2006 by Henry Throop, SwRI ;- function oc_search_pos_single_ucac2, ra, dec, radius, nstars, _extra=extra catalog_pass = 'UCAC2' return, oc_search_pos_fullcat(catalog=catalog_pass, ra, dec, radius, nstars,$ _extra=extra) end ;;;;;;;;;; pro other ; Various tests are here ; scat -c ucac2 -r 2062.64802 -d -t -j -n 1000000 7. 7. j2000 ; works ; scat -c ucac2 -r 2062.64802 -d -t -j -n 1000000 57. 57. j2000 ; gives ucac2 error message -- no file found stars=oc_search_pos_single_ucac2(0.01,0.01,0.01,ns, /verb) ; Searches, converts id's, returns stars, etc! plot, stars[*].ra, stars[*].dec, psym=3, xrange=[-.1,.1], yrange=[-.1,.1] ; Plot the returned stars id = 12345 id = 1 id_scat = oc_convertid_ucac2(ucac2=id) a=oc_getstar_ucac2(id) a0 = oc_getstar_ucac2('0') a1 = oc_getstar_ucac2('1') a2 = oc_getstar_ucac2('2') a3 = oc_getstar_ucac2('3') a = oc_getstar_ucac2(oc_convertid_ucac2(SCAT=$ oc_convertid_ucac2(UCAC2=['1', '10', '100', '1000', '10000', 'none']))) stop end