Scripting > Math Functions


Minimum Value in a Time Series

min(list of HecMath tsMathArray)

 

Determine the minimum 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 minimum 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: newDataSet = dataSet.min(list of HecMath tsMathArray)

Returns:  a new time series representing the minimum values of all time series.