;+
; PROJECT
;           SOLARB EIS
;
; NAME
;           EIS_STUDY_VOLUME
;
; PURPOSE
;           Calculate study duration
;
; NOTES
;           The data volume of a study is the sum of its component raster
;           durations, in ms. It does NOT take account of compression or
;           raster repeats. This will be taken care of within the PT
;
; CATEGORY
;           EIS technical planning
;
; WRITTEN
;           John Rainne
;
; VERSION
;           V0.0 Feb 2005
;           v0.1 Aug 2006
;                   Included UNITS parameter
;           V0.2 Jan 29 2007
;                   Removed compression and raster_repeats values
;                   Removed formatting
;           V0.2 28-Aug-2012
;                   Ensure TARGET keyword is input to "eis_compression"
;                    
;-
;************************************************************************
FUNCTION eis_study_volume, st

nRasters = st.nRasters
sra      = st.studyRasters
target   = STRTRIM(STRLOWCASE(st.target),2)
st_vol   = LONG64(0)
FOR i = 0, nRasters-1 DO BEGIN

    ra_vol = eis_compression(sra[i] , target=target          , $
                silent = silent) * sra[i].ra_repeats
    st_vol = st_vol + ra_vol

ENDFOR

RETURN , st_vol

END
