;+ ; NAME: ; smei_sky_hdr2range ; PURPOSE: ; Determines break values for display of skymaps from Fits header ; CATEGORY: ; camera/idl/sky ; CALLING SEQUENCE: FUNCTION smei_sky_hdr2range, hdr, difference=difference, degrees=degrees ; INPUTS: ; hdr array[1]; type structure ; OUTPUTS: ; R array; type: float ; array[3] ; INCLUDE: @compile_opt.pro ; On error, return to caller ; PROCEDURE: ; MODIFICATION HISTORY: ; APR-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- InitVar, difference, /key dpm = ToDegrees(degrees=degrees) CASE IsType(hdr,/string) OF 0: BEGIN maptype = strlowcase(hdr.map) good = 1 END 1: BEGIN maptype = strlowcase(fxpar(hdr,'MAP')) good = !err GE 0 END ENDCASE range = BadValue(0.0) IF good THEN BEGIN IF strpos(maptype,'north pole' ) NE -1 THEN BEGIN CASE difference OF 0: range = [0.0,1500.0,151.0] 1: range = [-2.0,2.0,201.0] ENDCASE ENDIF ELSE IF strpos(maptype,'south pole') NE -1 THEN BEGIN CASE difference OF 0: range = [0.0,1500.0,151.0] 1: range = [-2.0,2.0,201] ENDCASE ENDIF ELSE IF strpos(maptype,'equatorial') NE -1 THEN BEGIN CASE difference OF 0: range = [0.0,1500.0,151.0] 1: range = [-2.0,2.0,201] ENDCASE ENDIF ELSE IF strpos(maptype,'dirty sky brightness') NE -1 THEN BEGIN CASE difference OF 0: range = [0.0,1500.0,151.0] 1: range = [-2.0,2.0,201] ENDCASE ENDIF ELSE IF strpos(maptype,'psf position angle') NE -1 THEN BEGIN range = [-180.0/dpm,180.0/dpm,181.0] ENDIF ELSE IF strpos(maptype,'direction cosine angle') NE -1 THEN BEGIN range = [-60.0/dpm,60.0/dpm,121.0] ENDIF ELSE IF strpos(maptype,'theta-') NE -1 THEN BEGIN range = [-90.0/dpm,90.0/dpm,181.0] ENDIF ELSE IF strpos(maptype,'time (fraction of orbit)') NE -1 THEN BEGIN range = [0.0,1.0] ENDIF ELSE IF strpos(maptype,'time (sec since torigin)') NE -1 THEN BEGIN range = [0-60,102*60+60] ENDIF ENDIF RETURN, range & END