Jointly Documentation Status Updates

Jointly is a python package for synchronizing sensors with accelerometer data. You need this package if you’re a researcher who has recorded accelerometer data (plus possibly other data) on multiple sensors and wants to synchronize the multiple data streams precisely. Specifically, shake all your sensors together before and after a study and jointly will find these shakes, remove any temporal offset between sensors, and stretch the data so every clock aligns with a reference sensor. Jointly ingests and produces pandas DataFrame objects.


  • Detect and compare shakes in multiple sensor data streams

  • Remove temporal offsets in the data

  • Remove clock speed offsets by stretching the data


Install the package from pypi:

pip install jointly

You might want to check out our contributing guide in case you want to edit the package.


The data has to be provided in pandas DataFrame instances with a DateTimeIndex for each sensor. In the following example, Faros and Empatica are two sensors we want to synchronize, and we have already prepared dataframes for them. The Empatica is the reference source, and thus the Faros’ data will be changed in the output. The ref_column is the column that contains the characteristic shake, and all other columns in the DataFrame will be synchronized together with that column.

import pandas as pd
import tempfile
import traceback

import jointly

# load source dataframes with datetime index
faros_df = pd.read_csv(
physilog_df = pd.read_csv(

# the magnitude is a common property that keeps shake information without axis relevance
faros_df["Accel Mag"] = jointly.calculate_magnitude(
    faros_df, ["Accel X", "Accel Y", "Accel Z"]
physilog_df["Accel Mag"] = jointly.calculate_magnitude(
    physilog_df, ["Accel X", "Accel Y", "Accel Z"]

# create dictionary of source sensors
sources = {
    "Faros": {
        "data": faros_df,
        "ref_column": "Accel Mag",
    "Physilog": {
        "data": physilog_df,
        "ref_column": "Accel Mag",

# set shake extraction parameters
extractor = jointly.ShakeExtractor()
extractor.start_window_length = pd.Timedelta(seconds=15)
extractor.end_window_length = pd.Timedelta(seconds=10)
extractor.min_length = 3
extractor.threshold = 0.55

# prepare the synchronizer
synchronizer = jointly.Synchronizer(
    sources, reference_source_name="Faros", extractor=extractor

# if the extractor parameters are wrong, print the problem and show the data
    # get_synced_data returns a dictionary of sensor names to synced DataFrames
except Exception:

# save a file for each input sensor somewhere
with tempfile.TemporaryDirectory() as tmp_dir:

Template Credits

This package was created with Cookiecutter and the pyOpenSci/cookiecutter-pyopensci project template, based off audreyr/cookiecutter-pypackage.


Arne Herdick, Felix Musmann, Ariane Sasso, Justin Albert, & Bert Arnrich. (2022). Jointly: A Python package for synchronizing multiple sensors with accelerometer data (1.0.4). Zenodo.