;+ ; NAME: ; oc_search_pos_single_sao ; ; PURPOSE: (one line) ; Searches around a given position in the sao catalog. ; ; DESCRIPTION: ; This routine is a wrapper to oc_search_pos_fullcat/oc_search_pos_subcat . ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; oc_search_pos_single_sao, RA, DEC, RADIUS, NSTARS, ; METHOD=method, _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: ; METHOD -- either 'FULLCAT' or 'SUBCAT', for on search method requested. ; ; KEYWORD INPUT PARAMETERS: ; /VERBOSE -- If set, print diagnostics to screen. ; _extra -- Passed on ; ; 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. ; $WCS_CATDIR/sao -- For sao catalog ; ; EXAMPLE: ; print, (oc_search_pos_single_sao(0.1, 0.1, 0.01, nstars)).ID ; [Locates three stars] ; ; MODIFICATION HISTORY: ; Written 10-Nov-2006 by Leslie Young, SwRI ;- function oc_search_pos_single_sao, ra, dec, radius, nstars, verbose=verbose if strlen(getenv('SAO_PATH')) eq 0 then $ print, 'Warning: SAO_PATH not set.' name_catalog= 'sao' ids_scat = oc_scat(ra, dec, radius, name_catalog, nstars, $ verbose=verbose) if nstars eq 0 then return, -1L ids = long(ids_scat) stars= oc_getstar_sao(ids, nstars=nstars, verbose=verbose) return, stars end