;+ ; NAME: ; smei_star_info ; PURPOSE: ; Retrieves info about stars from the SMEI star catalogue ; CATEGORY: ; CALLING SEQUENCE: FUNCTION smei_star_info, star, $ degrees = degrees , $ count = count , $ get_ra_dec = get_ra_dec, $ rectangular = rectangular,$ get_struct = get_struct, $ get_number = get_number, $ get_name = get_name , $ get_obafg = get_obafg , $ get_magv = get_magv , $ get_magb = get_magb , $ get_mags = get_mags , $ _extra = _extra ; INPUTS: ; star array; type: structure ; smei_star_list structure returned by smei_star_list. ; OPTIONAL INPUT PARAMETERS: ; /get_number get number from smei catalogue ; /get_ra_dec get RA and declination (this is also the default) ; /get_name get ascii name for star ; /get_obafg get spectral class ; /get_magv get visual magnitude ; /get_magb get blue magnitude ; /get_mags get SMEI magnitude ; ; If 'star' does not exist on input, or is not specified then smei_star_list ; is called to read the star catalogues. All keywords to smei_star_list can be ; used to control which star catalogues are read. ; OUTPUTS: ; result array[2,*] or array[*]; type: depends on keywords ; if none of the /get* keywords is set then the ; equatorial location of the stars are returned in ; radians or degrees ; (depending on setting of /degrees keyword). ; array[0,*] is the right ascension ; array[1,*] is the declination ; ; Otherwise the quantity indicated by the get* keyword ; is returned. ; OPTIONAL OUTPUT PARAMETERS: ; star if 'star' does not exist on input then the result from a ; call to smei_star_list is returned ; count=count # stars in 'star' structure ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; IsType, smei_star_list, InitVar, AngleUnits ; PROCEDURE: ; Returns fields from the 'star' structure ; MODIFICATION HISTORY: ; FEB-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- CASE IsType(star, /struct) of 0: star = smei_star_list( _extra=_extra, count=count ) 1: count = n_elements(star) ENDCASE InitVar, get_number , /key InitVar, get_name , /key InitVar, get_ra_dec , /key ; Not used (this is the default) InitVar, get_obafg , /key InitVar, get_magv , /key InitVar, get_magb , /key InitVar, get_mags , /key InitVar, get_struct , /key InitVar, rectangular, /key CASE 1 OF get_number : RETURN, star.nr get_name : RETURN, star.name get_obafg : RETURN, star.obafg get_magv : RETURN, star.magv get_magb : RETURN, star.magb get_mags : RETURN, star.mags get_struct : RETURN, star rectangular : RETURN, cv_coord(from_sphere=transpose( $ [ [AngleUnits(from_time=star.ra , /to_angle, degrees=degrees, /singlesign) ], $ [AngleUnits(from_sexa=star.dec, /to_angle, degrees=degrees, /singlesign) ], $ [replicate(1,count)] ] ), /to_rect, degrees=degrees ) ELSE : RETURN, transpose( $ [ [AngleUnits(from_time=star.ra , /to_angle, degrees=degrees, /singlesign)], $ [AngleUnits(from_sexa=star.dec, /to_angle, degrees=degrees, /singlesign)] ] ) ENDCASE END