1. Home
  2. Knowledge Base
  3. Opensignals
  4. Quick Start
  5. How to create a time vector & timestamp information from raw OpenSignals sensor data
  1. Home
  2. Knowledge Base
  3. Opensignals
  4. How to create a time vector & timestamp information from raw OpenSignals sensor data
  1. Home
  2. Knowledge Base
  3. biosignalsplux
  4. Software
  5. How to create a time vector & timestamp information from raw OpenSignals sensor data
  1. Home
  2. Knowledge Base
  3. BITalino
  4. Software
  5. How to create a time vector & timestamp information from raw OpenSignals sensor data

How to create a time vector & timestamp information from raw OpenSignals sensor data

This article shows you how to create time vector & timestamp information from raw OpenSignals sensor data.

Creating a Time Vector using the Sequence Number

The biosignalsplux device provides a Sequence Number (nseq) with each sample it sends, which can be found in the first column of any OpenSignals acquisition file. This sequence number can be used to recreate a time vector as shown in the following steps.
Let’s take as an example a single-sensor acquisition conducted with a biosignalsplux system at two different sampling frequencies.

  • Acquisition A acquired sensor data at 1000Hz sampling rate. In this setting, each sample is successively acquired at 1ms intervals.
  • Acquisition B acquired sensor data at 500Hz sampling rate. In this setting, each sample is successively acquired at 1ms intervals.

Using this information, we can remap the nseq values into the relative time passed since the beginning of the acquisition as follows:

Acquired @ 1000Hz Acquired @ 500Hz
Nseqt [ms] Nseqt [ms]
00 00
11 12
22 24
33 36
44 48
55 510
 

Creating a Time Stamp using the Time Vector and Acquisition Start Time


With the created time vector, it is possible to create an actual timestamp. For this, you need to record the time at which you receive your first sample from the biosignalsplux device or when the acquisition started.

 Following up on the previous example, imagine that we get the first time sample exactly at 12:00.000pm. Using this starting time, we can recreate the timestamp for the biosignalsplux devices: 

Acquired @ 1000Hz | Start at 12:00.000pm Acquired @ 500Hz | Start at 12:00.000pm
Nseqt [ms]Timestamp Nseqt [ms]Timestamp
0012:00.000 0012:00.000
1112:00.001 1212:00.002
2212:00.002 2412:00.004
3312:00.003 3612:00.006
4412:00.004 4812:00.008
5512:00.005 51012:00.010
 

If you are using OpenSignals, you can also check the information in the header of the acquisition file. In there, you should find an entry “time” which provides information about the time the acquisitions started and use this time as the start of your timestamp series.

Updated on 23 de December de 2021

Was this article helpful?

Related Articles

Need Support?
Get one-to-one support for your Plux device or sensor from our team of biosignals experts.
Get Support