;+
; PROJECT
;           SolarB EIS
;
; NAME
;           EIS_RASTER_DATARATE
;
; PURPOSE
;           This function is used to calculate the data rate of a raster
;           (taking into account any compression), and to return that
;           as a string - eg:  "14.1008 kBits"
;
;Category   :EIS technical planning
;
; VERSION
;           V0.0 Written - John Rainnie Jan 2007 RAL
;
;-
;************************************************************************
FUNCTION eis_raster_datarate , raster

ra_vol = eis_compression(raster)
ra_dur = raster.duration
ra_dr  = (DOUBLE(ra_vol)/1024.)  /  (DOUBLE(ra_dur)/1000.)

dr     = STRJOIN([STRING(format='(D10.4)',ra_dr),' kBits/s'],/SINGLE)

RETURN , STRTRIM(dr,2)

END
