;+ ; NAME: ; hd_mag_to_flag ; ; PURPOSE: (one line) ; Decode HD catalog's special magnitude labels into their meaning. ; ; DESCRIPTION: ; HD catalog encodes some non-magnitude information in the ; magnitude field. ; ; Decode HD catalog's magnitude labels into their meaning. ; '20' becomes 'Nebula?' ; '30' becomes 'Variable?' ; '40' becomes 'Nova?' ; '50' becomes 'Cluster?' ; For any other values, '' is returned. ; ; These decodings are taken from the Vizier HD ReadMe file. ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; Flag = hd_mag_to_flag(mag) ; ; INPUTS: ; Mag -- Stellar magnitude as listed in HD catalog. Scalar. ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; None ; ; KEYWORD OUTPUT PARAMETERS: ; None ; ; OUTPUTS: ; None ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; None ; ; EXAMPLE: ; print, hd_mag_to_flag(30d) ; [Prints 'Variable?'] ; ; MODIFICATION HISTORY: ; Written 19-Oct-2005 by Henry Throop, SwRI ; Modified 28-Feb-2006 by HBT. Improved documentation and formatting. ;- function hd_mag_to_flag, mag flag = '' if (double(mag) eq 20d) then flag = 'Nebula?' if (double(mag) eq 30d) then flag = 'Variable?' if (double(mag) eq 40d) then flag = 'Nova?' if (double(mag) eq 50d) then flag = 'Cluster?' return, flag end