Skip to main content

micromotion

Analysis of human micromotion in motion time series: optical marker data, body-worn accelerometers, respiration belts and force plates.

The measure the package exists for is quantity of motion — the average speed of a body part, band-limited to 0.2–10 Hz, in millimetres per second. It applies equally to all three sensor families because the shared abstraction is the frequency band, not the instrument.

pip install micromotion
import micromotion as mm

rec  = mm.read("Standstill2017/mocap_data/A0001.tsv")   # dispatches on content, not extension
head = rec.marker("P01")
mm.qom(head, rec.fs, kind="position").mean_mm_s

Documentation

Reference documentation how to use it, every function, the conventions
Wiki why it works this way — traps, recipes, open questions
Changelog what changed, and why

New to it: Getting started, then The two bands, which is the one convention you cannot skip.

What is in it

Module Contents
qom quantity of motion from position or acceleration
filters the band definitions, band-pass, low-pass, high-pass, cardiac notch
resample rate measurement, downsample-only resampling, irregular-to-regular gridding
validate checks that fail loudly on silently-wrong data
posture, balance sway geometry, centre-of-pressure measures
spectral, physio cardiac and respiratory peaks, band power, breathing rate
dynamics DFA, multifractality, recurrence, surrogates, entropy
group whether these people moved at the same moments
align, circular offsets between clocks; directional statistics
io, record one reader per corpus layout, a content sniffer, a common record type

Why it exists

It was built while constructing a single analysis across every dataset in the Oslo Standstill Database. There were 159 analysis scripts, of which 58 defined their own band-pass filter and 37 computed quantity of motion. The project's central measure existed in dozens of copies that did not all agree, and the disagreements were invisible.

Every default here was measured rather than assumed, and the reasoning is kept beside it. The traps page lists the mistakes that shaped the design; each one happened, produced a believable wrong number, and raised nothing at the time.

Requirements

Python 3.10+, numpy, scipy, pandas.

Licence

GPL-3.0-or-later. If you use it, please cite it — see CITATION.cff.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micromotion-0.8.0.tar.gz (120.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micromotion-0.8.0-py3-none-any.whl (85.5 kB view details)

Uploaded Python 3

File details

Details for the file micromotion-0.8.0.tar.gz.

File metadata

  • Download URL: micromotion-0.8.0.tar.gz
  • Upload date:
  • Size: 120.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for micromotion-0.8.0.tar.gz
Algorithm Hash digest
SHA256 d3508741ff686eb707fe192ca20688da3e50a064aed1c9d4a53f2d6f35e97e74
MD5 14d36dcc0d062eccb14b7f90ce7350f3
BLAKE2b-256 f9cbed010bb3e74f13c4dd1a574c0f287d0e3fa39d23571950db87018317c1d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromotion-0.8.0.tar.gz:

Publisher: publish.yml on fourMs/micromotion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file micromotion-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: micromotion-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 85.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for micromotion-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f881177ac216a896dc940b739fface28f33306b2aec2ccf12a11907275795266
MD5 4c56cad2410b7249b93156fdec5e7fac
BLAKE2b-256 9ca884405499a1af8047326e48874a4086e9668f52cd77d2818806eec1a84318

See more details on using hashes here.

Provenance

The following attestation bundles were made for micromotion-0.8.0-py3-none-any.whl:

Publisher: publish.yml on fourMs/micromotion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page