;+ ; NAME: ; mpc_getline_orbits ; ; PURPOSE: (one line) ; Return the raw catalog line from the MPC for a given ID ; ; DESCRIPTION: ; Return the raw catalog line from MPC for a given ID or IDs. ; The catalog line is a single line of text which is human-readable, ; although it must be carefully interpreted. ; ; This routine searches through the catalog using grep. For small ; catalogs like this, grep is fast enough. ; ; ; CATEGORY: ; MPC ; ; CALLING SEQUENCE: ; lines = oc_getline_mpc( ids [, NSTARS=nstars] [, /VERBOSE]) ; ; INPUTS: ; IDs -- A list of ID's. Scalar or vector. ; IDs must be one of the following formats ; * provisional designation, such as "2003 EL61" ; * packed provisional designation, such as "K03E61L" ; * number, such as 2060L (should be long) ; * name, such as Chiron ; * line number in the file, such as 1 ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; /provisional ; /packed_provisional ; /number ; /name ; /line ; filename = filename to search (needed for /line) ; /VERBOSE -- If set, print diagnostics to screen. ; ; KEYWORD OUTPUT PARAMETERS: ; NSTARS -- Returns the number of successfully-retrieved lines. ; ; OUTPUTS: ; If input is a scalar, then output is a single string. ; If input is a vector, then output is an array of strings. ; If a star is not found, returned value is ''. ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; MPC catalogs must be available at $WCS_CATDIR/sao/catalog.dat . ; ; EXAMPLE: ; print, oc_getline_sao(['430', '1000']) ; ; MODIFICATION HISTORY: ; Written -Nov-2005 by Henry Throop, SwRI ; Modified 27-Feb-2006 by HBT. Improved documentation and formatting. ; Modified 05-Mar-2006 by LAY. Change nstars to count (consistent ; with oc_getline_ucac2) ; Modified 15-Mar-2006 by HBT. Undid LAY's nstars change (hah!), ; as it already was consistent w/ ucac2. ; Modified 10-Nov-2006 by LAY. Close opened lun. ; ;- function mpc_getline, nelem, fn=fn catalog = 'sao.dat' path_catalog = getenv('SAO_PATH') nstars = 0 num_ids = sizex(ids) lines = strarr(num_ids) linelen = 205L ; characters per line nlines = 258997L end