Skip to content

Sampling period

Sampling period is defined as number of samples of equidistant (sampled at a constant rate) time series per unit of time.

In ideal situation, all timestamps are evenly spaced, resulting in a constant sampling period. However, this is not the reality for data in many fields, e.g. in finance or manufacturing data are captured unevenly.

TIM Engine is capable to work with data that has constant sampling period, missing data, as well as data with irregular sampling period. Hence TIM Studio does not set any constrains when you try to upload data, however it tries to protect existing data should you accidentally mixed wrong version of Dataset and would try to update regular data with irregular etc.

Dataset detail

You can see parameters that supported decision about sampling period in section shown in Dataset detail screen. Parameters shown are:

  • Smallest space between timestamps
  • Median distance between timestamps
  • Irregular sampling period

and, depending on data, also box informing you if irregularities in daily count were detected.

Detection of sampling period

List below provides view on parameters that checked to determine sampling period:

  • the smallest space between timestamps (in sorted data);
  • median space between timestamps (in sorted data);
  • is there a timestamp that does not fit in expected timestamps - array generated between the first and last timestamp with the step of the smallest gap detected, if yes, this will result in Irregular sampling period shown with Yes;
  • Irregular daily count (in short IDC) occurs when amount of timestamps per day is not constant, and when expected timestamps are not crossing midnight;

Implications to functionality and results

Functionality you can use (settings to TIM Engine), and sampling of results depends on sampling period parameters.

Parameters Settings constrains Sampling period of results Example
Regular sampling period No constrains Smallest space between timestamps an hour, e.g. [ 01:00, 02:00, 03:00 ... ]
Regular sampling period, and Irregular daily count Cannot use Daily cycle parameters and Dictionaries - calendar-based, Periodic components and Fourier Smallest space between timestamps Timestamps spaced evenly 7 seconds e.g. [ 01:00:07, 01:00:14, 01:00:21, 01:00:28 ...], or

Timestamps with minute is always 13, e.g. [ 04:13, 05:13, 06:13 ... ]
Irregular sampling period and/or Irregular daily count Cannot use Daily cycle parameters and Dictionaries - calendar-based, Periodic components and Fourier Median space between timestamps Timestamps captured at random second e.g. [ 00:00:02, 00:00:03, 00:00:12, 00:00:29, 00:40:57 ...]

It is not possible to update Dataset with Regular sampling period with data which has Irregular sampling period.