SynScope

Purpose

SynScope is an offline visualization and alignment tool for time-varying signals aquired from multiple sources, that may differ in offset and/or sample rate.

SynScope allows to define reference points that correspond to identical events between source pairs. It then estimates the offset and resample rate to link these sources. I.e., it maps sample time from one source to the other via a link equation.

Signal alignment can be inspected with (i) synchronous visualization or (ii) resampling.
(i) Synchronous visualization: linked signals scroll together according to the link relation.
(ii) Resampling: linked signals are resampled to the highest sample rate and offset-compensated.

Resampled signals can be merged in a single file. Reference points and link relations can be exported for use in other programs.

A typical usage example is the inspection of data recorded from multiple sensors aquired on different systems.

Key features

Typical usage pattern

A typical workflow comprises the following steps:
  1. Data sources set-up: the files containing the data sources are specified in the signal source box and loaded. See sections setting-up data sources and file format.
  2. Views set-up: multiple views into the data sources are configured. See section setting-up views.
  3. Visual inspection: see section user-interface.
  4. Set-up reference points: points corresponding to identical events in the different sources can be identified and stored. See section reference points and links.
  5. Visual inspection, resample: signal sources can be synchronously visualized, or resampled, to make sure they are correctly aligned. Reference points can be added or removed if needed. See section reference points and links.
  6. Resample and merge: once the reference points allow a satisfying alignment the signals can be resampled and merged in a single file, or the reference points and link equations can be exported to use in another program. See section Resample.

Setting-up data sources

Data sources are specified with the following syntax:
<signal;/path/to/source/file1><signal;/path/to/source/file2>...
Data sources are loaded by clicking on the Load sources button.
When setting up the views, the data sources are referenced by their number. The first source (file 1) is source 0, etc.

Setting-up views

Views into the signals are specified by a display format string. It indicates how many scopes are on screen and which sources and channels they show.

The views are specified with the following syntax:
<source#;title;channel[;xscale=xs][;yscale=auto|minmax][;color=colors]><......

As an example, consider the following display format string:

<0;Calibrated;5 6 7;xscale=1;yscale=-3300 3300 ;color=ff0000 ff00 ff> <2;Raw;2 3 4;xscale=-2;yscale=auto>

It defines two scopes. The first shows channels number 5, 6 and 7 of source 0, in red, green and blue respectively, with manual vertical scale, default horizontal scale, and the title Calibrated. The second shows channels number 2, 3 and 4 of source 2, with automatic vertical scale, zoom out 2x on the horizontal scale.

Reference points and links

Reference points are specified between a primary and a secondary source.

Primary and secondary sources are selected by right-clicking in the scopes. Scopes are highlighted according to their primary/secondary status.

The reference point corresponds to the center point of the primary and secondary scopes. Left-clicking in a scope centers the scope on the cursor position. Reference points are added from the menu (Links/Add reference points) or from the reference point window (Link/Edit reference points and links). The reference point window allows to edit (add, delete, clear) the reference points, and shows the link equation between the sources.

A minimum of two reference points is required to define a link equation between two sources. With more reference points, a best fit between the reference points is computed.

Links between signals can be activated when enough reference points are specified from the Links/Edit reference points and links window.

Resample

Linked signals can be resampled to identical frequency and offset-compensated (Resample/Resample linked signals). After resampling, all the linked signals have the same sample numbers, and are linked by an identity relation.

Resampled signals can be merged into a single file (Source/Merge and save sources).

User interface

Scopes be scaled, scrolled, etc, as follows:

File format

Source files are text files, with one line per sample, and one column per channel. Channels are space or tab delimited. Sample values must be integers.

Limitations

License

This software is licensed under the terms of the GPL v.2 license.