Math Functions > Time Functions


Irregular to Regular

The Irregular to Regular function interpolates or extracts values from existing irregular interval time series data sets to create new regular interval time series data sets, or “snaps” (moves) irregular interval data to the regular times.

 

For interpolating, whether the time series data type is “INST-VAL,” “INST-CUM,” “PER-AVER,” or “PER-CUM” controls how the interpolation is performed.  Interpolated values are derived from “INST-VAL” or “INST-CUM” data using linear interpolation.  Values are derived from “PER-AVER” data by computing the period average value over the new regular time interval.  Values are derived from “PER-CUM” data by computing the period cumulative value over the new regular time interval.

 

For example, if the original data set has data that typically occurs several times in a six-hour period and the new regular interval data set is to have a six-hour time interval:

 

The Snap function derives new regular interval time series by "snapping" data to a user specified regular interval time if the time of the original data falls within the time window tolerance set by the user.  A snap just changes the time of the data values and does no interpolation.  For example, a time series record from a gauge recorder collects readings 6 minutes past the hour.  The Snap Irregular to Regular function is often used to “snap” or shift the time points to the top of the hour.

 

Times in resultant time series may be shifted (offset) from the regular interval time by a user specified offset.  As an example, the offset could be used to shift times in regular hourly interval data from the top of the hour to 6 minutes past the hour.

 

By default values in the resultant regular interval time series data sets are set to missing unless matched to times in the original time series data set (within the time window tolerance).

 

To convert irregular interval time series data to regular interval data by interpolation:

  1. Choose the Time Functions tab of the Math Functions screen and select the Irregular to Regular operator, as shown above.  Select the Interpolate radio button.
  2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen.  If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
  3. From the Time Interval list, select the time interval for the data sets.
  4. Optionally, you may specify a Time Offset to offset the new points in time from the standard interval time.  For example, if you select a daily interval for the Time Interval, you may use the option to offset time points to be at 6 a.m. instead of at midnight.  If the Set Time Offset box is checked, enter an integer number in the box to the right and select the minute/hour/day/week/month/year time increment from the list further to the right.  If the Set Time Offset box is unchecked, times in the resultant data sets will fall on the regular interval time (typical setting).
  5. Click the Compute button to perform the interpolation.

 

To convert irregular interval time series data to regular interval data by snapping:

  1. Choose the Time Functions tab of the Math Functions screen and select the Irregular to Regular operator.  Select the Snap radio button.
  2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen.  If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once. 
  3. From the Time Interval list, select the regular interval time period for the resultant time series data sets.
  4. Optionally, you may specify a Time Offset to offset the new points in time from the standard interval time.  For example, if you select a daily interval for the Time Interval, you may use the option to offset time points to be at 6 a.m. instead of at midnight.  If the Set Time Offset box is checked, enter an integer number in the box to the right and select the minute/hour/day/week month/year time increment from the list further to the right.  If the Set Time Offset box is unchecked, times in the resultant data sets will fall on the regular interval time (typical setting).
  5. Use the Time Back and Time Forward offsets to define a time window around the regular interval time.  If a time point from the selected time series data set falls within the time window, the data value is applied to the new regular interval time point.  These offsets are set in the same manner as the Time Offset above.
  6. Click Compute.