Export data to custom rates

Some data analysis software tools or methodologies requiere that data is exported to different sampling rates compared to the ones it was stored with. This can be achieved by resampling and then exporting data to the desired custom rate.

DS_exporting_resampler_types

You can choose between three resampler types:

  • Hold
  • Linear
  • Alias free

Hold

The easiest and most straightforward resampling method is the Hold method. It outputs the last sampled value until the next one becomes available. This method can be used to export data from Scalar, Vector or Matrix channels. Their time base can be Synchronous (samples are uniformly spaced) or Asynchronous (samples are nonuniformly spaced).

For comparing times of two samples we use a default approximation error of $\small \epsilon = 1 / exportRate * 10^{-3}$

For a timestamp of 2 s, the value of a selected sample is exported, if we want to export the green signal with an adjusted export rate of 1 Hz.

Linear

A method that is a bit more complex and accurate method is linear interpolation. It calculates new samples by performing a linear interpolation between two samples. This method can only be used to export data from Synchronous or Asynchronous Scalar channels.

For a timestamp of 2 s, the interpolated value is exported, if fwe want to export the green signal with an adjusted export rate of 1 Hz.

Alias-free

The most complex method and the one which produces the most accurate results is the Alias-free method. It resamples the data by filtering it with an anti-aliasing filter. The properties of the filter used can be set in the Options -> Settings -> Advanced -> Export. This method can only be used to export data from Synchronous Scalar channels.

Export rate

The export rate of the exported data is not completely custom. Because of the way the data is written to different file types we distinguish two ways of exporting data:

  • Channel-based, where every channel is its own entity and a custom export rate must be a multiplier of the acquisition rate.
  • Value-based, where the custom export rate must be a multiplier of all the channels’ sample rates.

The export types of all the available file types can be seen in the table below.

Channel based Value based
FlexPro [*.fpd] Microsoft Excel [*.xls]
Matlab [*.mat] DIAdem [*.dat]
UNV 58 [*.unv] Text File [*.txt/csv]
FAMOS [*.dat] Sony [*.log]
NSoft time series [*.dac/mdf] RPCIII [*.rsp]
Technical data management [*.tdm] Comtrade [*.cfg]
JSON [*.json] Replay [*.rpl]
ASAM MDF4 [*.mf4] BWF [*.dat]
S3 [*.s3t]
HDF5 [*.h5]
DynaWorks neutral file [*.nt]
Standard data file (SDF) [*.dat/sdf]
WFT [*.wft]
Wave [*.wav]
Google earth [*.kml]
CAN messages [*.csv]
IFile [*.csv]

The maximum allowed custom export rate of any channel in a data file is the sample rate with which the file was stored (overall dynamic acquisition rate).

Channels of some data structure (String data, Binary data…) cannot be exported using the methods mentioned here. To export these types of channels you must first disable the resampling methods in the Options -> Settings -> Advanced -> Export.