function oc_search_pos_single_tyc2, ra, dec, radius, nstars, _extra=extra ; Searches for stars in the TYC2 catalog. ; ; Inputs: ; ra: J2000 RA of search center (radians, double) ; dec: J2000 Dec of search center (radians, double) ; radius: Search radius (radians, double) ; ; Outputs: ; nstars: optional returned value which indicates number of stars found. ; ; Returned value: ; star: List of matching stars (array[nstars] of structures) ; ; Details: ; This routine searches the TYC2 catalog. It is a wrapper routine to the ; functions that actually do the searching. ; ; Author: HBT ; ; History: ; 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 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