;+ ; NAME: ; oc_search_pos_single_tyc2 ; ; PURPOSE: (one line) ; Searches for stars in the TYC2 catalog. ; ; DESCRIPTION: ; Searches for stars in the TYC2 catalog. ; ; CATEGORY: ; ; CALLING SEQUENCE: ; stars = oc_search_pos_single_tyc2(ra, dec, radius, nstars) ; ; INPUTS: ; ra: J2000 RA of search center (radians, double) ; dec: J2000 Dec of search center (radians, double) ; radius: Search radius (radians, double) ; ; ; OPTIONAL INPUT PARAMETERS: ; ; KEYWORD INPUT PARAMETERS: ; ; KEYWORD OUTPUT PARAMETERS: ; ; OUTPUTS: ; nstars: optional returned value which indicates number of stars found. ; ; Returned value: ; star: List of matching stars (array[nstars] of structures) ; ; RESTRICTIONS: ; ; PROCEDURES ; This routine searches the TYC2 catalog. It is a wrapper routine to the ; functions that actually do the searching. ; ; EXAMPLE: ; stars = oc_search_pos_single_tyc2(0.1, 0.1, 0.01, nstars) ; ; MODIFICATION HISTORY: ; Author: HBT ; 30-Nov-2005: Original version HBT. Based on oc_search_hd_single ; 15-Dec-2005: Renamed from oc_search_tyc2_single. ; 02-July-2006 Leslie Young; rewrite to call oc_scat ;- function oc_search_pos_single_tyc2, ra, dec, radius, nstars, _extra=extra if strlen(getenv('TY2_PATH')) eq 0 then $ print, 'Warning: TY2_PATH not set.' name_catalog= 'ty2' ids_scat = oc_scat(ra, dec, radius, name_catalog, nstars, verbose=verbose) if nstars eq 0 then return, -1L ids_fix= strarr(nstars) for i = 0L, nstars-1 do begin ids_fix[i] = strmid(ids_scat[i], 0, 4) + $ '-' + strmid(ids_scat[i], 5, 4) + '-' + strmid(ids_scat[i], 9, 1) end stars= oc_getstar_tyc2(ids_fix, nstars=nstars, verbose=verbose) return, stars ; catalog_pass = 'TYC2' ; return, oc_search_pos_fullcat(catalog=catalog_pass, ra, dec, radius, nstars, _extra=extra) end