April 2024

Research

Event Based Analysis of Motion Sequences

Learn how to easily extract the sensor raw data of motion sequences using event markers and Moticon's OpenGo Python library.

Robert

event based analysis of motion sequences with Moticon OpenGo software

Share via

Efficient Processing Pipeline for Motion Sequence Analysis

When analyzing motion data measured with the OpenGo sensor insole system, we are often interested in single or repetitive motion sequences. Let’s assume we want to apply a script-based analysis on just those sequences (e.g. using Python), i.e. we wish to get hold of the corresponding raw data sequences without having to manually handle portions of measurement files.

A super efficient processing pipeline to achieve this is as follows:

  • Use the OpenGo Software to manually set events, marking the beginning and ending of motion sequences of interest, or highlighting specific points in time.
  • Export the data as a .txt file.
  • Use the OpenGo python library to extract the raw data sequences.

These steps are explained in the following.

Setting Events in OpenGo Software

You can use the OpenGo Software to manually set events. Events are organized in groups, and carry a name and value. All of these three attributes can later be used to easily filter events in Python. Use line graphs, plantar pressure distribution widgets, and video(s) to perfectly set the desired events.

Tip: Use the mouse wheel on the line graph time axis to zoom in and out, or use the “+” key to zoom in..
Pro tip: Events can also be set using the “E” key on your keyboard.

Export Data as Text File

Just go to the Analyze screen and export your desired measurement (or complete folders) as text files. They will automatically include your events.

Extract Events and Data in Python

Let’s extract the total force measured by the left sensor insole for all sequences marked by events. This is simple, as the below Code Example 1 shows.

Here, we assume that we have chosen an event value of 1 for all events starting a sequence, and an event value of 2 for the stopping events. Have a look at the optional arguments of get_events() and get_event_pairs() for further filtering options.

The OpenGo Python library provides a fully working example including sample data. You can install the OpenGo Python library from PyPI using: pip install moticon-opengo

If you rather want to work with automatically detected step events instead of manually set events, check out our article Gait analysis with 29 lines of Python code – programming with OpenGo text export.

Code example 1

				
					meas = Measurement('my_data_export.txt')

for ev1, ev2 in meas.get_event_pairs(start_values=[1], stop_values=[2]):
    left_force = meas.side_data[Side.LEFT].total_force[ev1.index:ev2.index]
				
			

Stay one step ahead!

Subscribe to our newsletter for the latest information on case studies, product updates and company news

Select your desired system

The cutting edge test based outcome assessment system for health professionals and trainers

The most versatile toolkit for free data acquisition and comprehensive analytics in research

Have a general inquiry?

Write us a message for general questions about products and solutions or if you’d like to discuss other topics.


moticon-rego-sensor-insole-live-event

Stay one step ahead!

Subscribe to our newsletter for the latest information on case studies, webinars, product updates and company news

The form was sent successfully.

You will be contacted shortly.

Get support

Check our FAQ database for answers to frequently asked questions

Describe your issue in as much detail as possible. Include screenshots or files if applicable.


Need help?
Want a live demo?
Interested in prices?
Want to say hello?
Always just a call away
+49 89 2000 301 60