Scripting > Math Functions


Standard Deviation of Time Series

standardDeviation(list of HecMath tsMathArray)

 

Determine the standard deviation of the current time series and the each time series in the parameter, tsMathArray.  A new time series will be created which duplicates the time points of the current time series.  Where time points match for the current and tsMathArray, the values will be the standard deviation of all time series for that time, provided the values for all time series are valid values (not missing). Points in the current time series which cannot be matched to valid points in tsMathArray are set to missing.  Values in the current time series which are missing remain missing in the new time series.

 

The new time series will always have quality defined.  For a specific time, if any of the quailty values in the current or parameter time series is questionable or rejected, the quality value for that time in the new time series will be set to the most severe quality for that time (e.g. if questionable and rejected are both encountered, the new quality will be set to rejected.)

 

Parameters:

tsMathArray - the array of time series to be compared with the current time series.

Example: stdDev = tsData.standardDeviation(list of HecMath tsMathArray)

Returns:  a new time series representing the standard deviation of all time series.