submovements
Our goal is to detect sub-movements from motion data.
- Free software: MIT license
- Documentation: https://submovements.readthedocs.io.
Introduction
This software works on a pipeline basis.
To install use: pip install submovements
Input
The input is a directory of trials which are saved as CSV files with the following file names: li_stimulus_side_block#_repetition#.csv
Other .csv files with a different name format are ignored.
Pre-processing (Preprocessor class)
- (x,y) coordinates as a function of time are extracted from every CSV file.
- Butterworth zero-phase of 4th order is applied on the (x,y) positions. Further filtering is possible by expanding the preprocessor class.
- d(x,y)/dt is calculated to yield velocities (Vx,Vy) as a function of time.
- To remove the duration where (Vx,Vy) are approximately zero we use thresholding on ||(Vx,Vy)||, such that the any data where ||(Vx,Vy)|| < threshold (0.001 by default) is removed, not including a 0.1s portion around the time where motion took place.
- The filtered velocity is saved under the Trial class for further processing.
For specific explanations on methods and attributes see commentary in submovements/DataProcessing.py.
Trial processing (Trial class)
This class represents a single Trial for a given subject (labeled by its numeric id). For example, if the CSV files are saved under: :: data/results/sinmonvisual/12345/li_stimulus_side_block#_repetition#.csv The subject id is 12345
Additional attributes are: stimulus, block, repetition and data.
For specific explanations on methods and attributes see commentary in submovements/DataProcessing.py.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.