;+
; PROJECT
;           SolarB EIS
;
; NAME
;           eis_get_total_raster_width_string
;
; PURPOSE
;           Function to create a string label on eis_mk_raster
;
; CATEGORY
;           EIS Technical Planning
;
; INPUTS
;           ra - an eis_raster structure
;
; OPTIONAL INPUTS
;
;           None
;
; WRITTEN
;           John A Rainnie, Jul-2006, RAL
;
; MODIFICATION HISTORY
;
;           v0.1 JAR, 16-Mar-2007
;               Removed fov_string - this is unnecessary
;           v0.2 JAR 25-Apr-2007
;               Removed some more unnecessary code
;           v0.3 JAR/PRY 26-Apr-2007
;               fov_width now depends on slitIndex. Removed call to
;               "get_eis_fov".
;
;-
;************************************************************************
FUNCTION eis_get_total_raster_width_string , ra , tlbID

width = eis_get_total_raster_width(ra)

CASE ra.slitIndex OF
    0: fov_width = 590.
    1: fov_width = 856.
    2: fov_width = 592.
    3: fov_width = 630.
ENDCASE

IF (width GT fov_width) THEN BEGIN

    mText   = ['The total spatial width of this raster exceeds the EIS' +   $
               ' FOV width (' + STRCOMPRESS(FIX(fov_width),/REMOVE_ALL) +   $
               '")'                                                  ,      $
               'This raster will NOT be saved!']
    warning = DIALOG_MESSAGE(mText , DIALOG_PARENT = tlbID)

ENDIF

width_string = STRCOMPRESS( FIX(width) ,/REMOVE_ALL)
width_text   = STRJOIN(['Total Spatial Width = ',width_string,'"'],/SINGLE)

IF (ra.rasterType EQ 0) THEN BEGIN
    nExpString = STRCOMPRESS(ra.scan_FM_nSteps+1,/REMOVE_ALL)
    nExps      = STRJOIN(['(Number of exposures = ',nExpString,')'],/SINGLE)

    width_text = STRJOIN([width_text , nExps ] , ' ' , /SINGLE)
    
ENDIF

RETURN , width_text

END
