# Effect of acute psychosocial stress on body posture and movements – Main Study
## Overview
This repository contains data from the _Main Study_ that was collected during the project "Effect of acute psychosocial stress on body posture and movements" (StressPose).
The data in this repository are used for the following publication(s):
* "Machine learning-based detection of acute psychosocial stress from body posture and movements", currently under review.
## How to Work with the Data
### Download from OSF
To access the data download it from [OSF](https://osf.io/va6t3/).
### Install the StressPose Analysis Package (optional)
If you want to use this dataset it is recommended to install the [`stresspose-analysis`](https://github.com/empkins/stresspose-analysis) package. This package contains various helper functions to work with the dataset (including [`tpcp`](https://github.com/mad-lab-fau/tpcp) `Dataset` representations), process data, and different analysis experiments performed with the dataset.
See the [`stresspose-analysis`](https://github.com/empkins/stresspose-analysis) package for further information.
## Data Acquisition
### Study protocol
Body posture and movements of 41 participants were measured with a motion capture suit during the exposure to stress, induced with the Trier Social Stress Test (TSST) and in a control condition (friendly-TSST).
During the TSST, the participants had to give a free speech (5 min), which they prepared during the preparation phase (5 min) before the beginning of the TSST. Subsequently, they had to solve a mental arithmetic problem (5 min) in which participants had to count downwards from 2043 in steps of 17. In contrast, during the f-TSST interview, participants talked for 5 min about their CV, hobbies, favorite books, etc. followed by a 5 min mental arithmetics phase in which participants counted upwards from 0 in steps of 15. Each participant took part in the f-TSST and the TSST on two consecutive days at similar times of the day. The condition order (i.e., whether f-TSST or TSST was conducted first) was randomized.
During both conditions eight saliva samples were collected: Two saliva samples before the beginning of each (f-)TSST and six afterwards at the time points -40, -1, +15, +25, +35, +45, +60, and +75 min relative to (f-)TSST start. The motion capture recording was started before the beginning of the (f-)TSST and ended right after the end of the (f-)TSST. In addition, a set of questionnaires were collected before and after of the (f-)TSST interview (PASA, PANAS, STADI).
### Mocap System and Data Collection
For the data collection, the [XSens](https://www.movella.com/products/motion-capture) motion capture suit was used to measure body movements. The suit contains 17 sensor nodes, which include an IMU composed of a gyroscope, accelerometer, and magnetometer. These sensor nodes are attached to the body by straps.
The data collection can be controlled by the XSens software. Selected body dimensions of the participants were measured in order to create an individual body size model for each participant. Afterwards, the motion capture suit was calibrated using a calibration procedure consisting of a static standing pose and free walking. The calibration is required before the beginning of the data recording to get more accurate results.
With the XSens software, it is possible to export data into different file formats. For the study, the data were exported as `.mvnx` files for each participant and condition, respectively. The files contain motion data from different body segments, joints, and sensors with different channels (e.g., acceleration, angular velocity, orientation, etc.).
### Missing Data
Data is missing for the following subjects:
* `VP_03`: no mocap data for the Mental Arithmetics phase of the TSST
* `VP_31`: corrupted motion capture data (probably wrong sensor placement)
## Repository Structure
The repository is structured in the following way:
```bash
├── data_per_subject/
│ ├── <subject_id>/
│ │ ├── tsst/
│ │ │ ├── mocap/
│ │ │ │ └── processed/
│ │ │ │ └── <subject_id>_tsst-TEST.mvnx.gz # mocap data as exported from the XSens software, compressed with gzip
│ │ │ └── timelog/
│ │ │ ├── raw/
│ │ │ │ └── <subject_id>_tsst_timelog_test.csv # raw timelog data from the aTimeLogger app
│ │ │ ├── cleaned/
│ │ │ │ └── <subject_id>_tsst_timelog_test.csv # manually cleaned timelog data
│ │ │ └── processed/
│ │ │ └── <subject_id>_tsst_timelog_test.csv # reformatted timelog data for further automated processing
│ │ └── fsst/
│ │ ├── mocap/
│ │ │ └── processed/
│ │ │ └── <subject_id>_ftsst-TEST.mvnx.gz # mocap data as exported from the XSens software, compressed with gzip
│ │ └── timelog/
│ │ ├── raw/
│ │ │ └── <subject_id>_ftsst_timelog_test.csv # raw timelog data from the aTimeLogger app
│ │ ├── cleaned/
│ │ │ └── <subject_id>_ftsst_timelog_test.csv # manually cleaned timelog data
│ │ └── processed/
│ │ └── <subject_id>_ftsst_timelog_test.csv # reformatted timelog data for further automated processing
│ └── ...
├── questionnaires/ # questionnaire data from screening and pre/post (f-)TSST
│ ├── merged_total/ # manually merged, cleaned, and anonymized questionnaire data
│ │ └── questionnaire_data.xlsx
│ ├── processed/ # processed questionnaire data (questionnaire scores computed from raw items, etc.)
│ │ └── questionnaire_data_processed.csv
│ ├── Codebook_StressPose_Mainstudy.xls # total questionnaire codebook
│ └── codebook.csv/ # formatted questionnaire codebook for further processing (e.g., mapping numerical gender values to strings)
└── saliva/ # saliva data
├── raw/
│ ├── cortisol_values.xlsx # raw cortisol data as returned by the lab
│ └── estradiol_progesterone_values.xlsx # raw estradiol and progesterone data as returned by the lab to check for menstrual cycle phase
└── processed/
├── cortisol_samples.csv # processed cortisol levels in long-format
├── cortisol_features.csv # cortisol features computed from raw data
└── progesterone_estradiol_samples.csv # processed estradiol and progesterone levels in long-format
```