;+ ; NAME: ; oc_star_set_empty ; ; PURPOSE: (one line) ; Sets a star structure(s) to be empty (i.e., invalid). ; ; DESCRIPTION: ; Sets a star structure(s) to be empty (i.e., invalid). ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; empty = oc_star_set_empty(stars) ; ; INPUTS: ; stars -- Star or array of stars to be set empty. ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; None ; ; KEYWORD OUTPUT PARAMETERS: ; None ; ; OUTPUTS: ; Returns the newly-emptied stars. ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; None ; ; EXAMPLE: ; print, oc_star_isempty(oc_star_set_empty(oc_getstar_hd('100'))) ; [Prints 1, to indicate that star is empty] ; ; MODIFICATION HISTORY: ; Written 7-Dec-2005 by Henry Throop, SwRI ; Modified 28-Feb-2006 by HBT. Improved documentation and formatting. ; Renamed oc_star_set_invalid -> ; oc_star_set_empty. ; Modified 14-Apr-2006 by Leslie Young. Made loop index long. ;- function oc_star_set_empty, stars, VERBOSE=verbose nstars = sizex(stars) for i = 0L, nstars-1 do begin stars[i].idcat = 'none' stars[i].id = 'none' stars[i].idcat = 'none' stars[i].id = 'none' stars[i].et = -999d stars[i].ra = -999d stars[i].dec = -999d stars[i].raerr = -999d stars[i].decerr = -999d stars[i].radot = -999d stars[i].decdot = -999d stars[i].radoterr = -999d stars[i].decdoterr = -999d stars[i].mag[0:*] = -999d stars[i].magerr[0:*] = -999d stars[i].SpTcat = 'none' stars[i].SpT = '' end if is_scalar(stars) then return, stars[0] if is_array(stars) then return, stars end