Skip to main content

yeadon

Latest PyPI version Number of PyPI downloads https://anaconda.org/conda-forge/yeadon/badges/version.svg Documentation Status https://zenodo.org/badge/doi/10.5281/zenodo.15770.svg https://github.com/chrisdembia/yeadon/actions/workflows/runtests.yml/badge.svg

This package calculates the masses, center of mass positions, and inertia tensors that correspond to the human inertia model developed by Yeadon in (Yeadon, 1990). The package allows for the input of both measurements and configuration variables (joint angles), and provides 3D visualization using the MayaVi package. See the online documentation at https://yeadon.readthedocs.org/.

References

M. R. Yeadon, 1990. The Simulation of Aerial Movement-ii. Mathematical Inertia Model of the Human Body. Journal of Biomechanics, 23:67-74.

Directories

  • yeadon/ contains the python source files for the yeadon package.

  • doc/ contains source documents for building sphinx documentation.

  • misc/ contains figures and template input files.

  • misc/samplemeasurements/ contains sample measurement input files.

Installing

This package works with Python 3.10+.

Dependencies

yeadon depends on the following widely-used packages:

The following packages are optional:

  • MayaVi for visualization and GUI interaction

The following packages are needed for development:

  • Sphinx to create documentation

  • numpydoc Sphinx extension for NumPy-style documentation formatting

  • pytest for tests

Installing yeadon as a user

Option 1: Conda Forge

We maintain a Conda Forge binary of yeadon that is installable with Conda-based tools (conda, mamba, pixi, etc.). Conda is a general cross-platform package manager that provides all of these dependencies and it is often easiest to install to get started. Install yeadon with:

conda create -n yeadon-env -c conda-forge yeadon

If you install with conda and want to use the GUI, then you also need to install Mayavi. It is helpful to note that two backends to Qt are available for Mayavi. By default the pyqt backend is installed in an environment with, for example:

conda create -n yeadon-env -c conda-forge yeadon mayavi

You could instead install the PySide6 backend instead with:

conda create -n yeadon-env -c conda-forge yeadon mayavi=*=pyside6_*

Option 2: PyPi

The source releases are available on PyPi and many tools can install from PyPi. The easiest way to download and install the yeadon package is by using a tool like pip to obtain the package from the Python Package Index (PyPi):

$ python -m pip install yeadon

Development dependency installation

Option 1: Conda

Install the developmetn dependencies:

conda create -n yeadon-env -c conda-forge numpy pyyaml mayavi pytest sphinx numpydoc pip setuptools

You could instead install the PySide6 backend instead with:

conda create -n yeadon-env -c conda-forge numpy pyyaml pytest sphinx numpydoc pip setuptools mayavi=*=pyside6_*

Option 2: Operating system package manager

In some operating systems, the dependencies can also be obtained from the operating system’s package manager. For example, in Debian systems, you should be able to obtain all of these packages by opening a terminal window and typing:

$ # prepend sudo to each line below if you desire a system install
$ apt-get install python3-setuptools python3-numpy python3-yaml # required
$ apt-get install mayavi2 # optional packages
$ apt-get install python3-pytest python3-sphinx python3-numpydoc # development tools

For other operating systems (e.g. Windows or Mac), visit the websites for the packages for installation instructions.

Option 3: Building dependencies from source

This option is required if you want to use yeadon in a virtualenv. You can build the dependencies from source and then install them by using a tool like pip:

$ python -m pip install numpy PyYAML  # required
$ python -m pip install mayavi  # optional
$ python -m pip install pytest sphinx numpydoc  # development tools

or you can obtain the source code, perhaps from GitHub, and install the packages manually.

Getting yeadon

You can obtain an archive of the package at the Python Package Index (https://pypi.python.org/pypi/yeadon), and then install the package on your own by executing the following from the root directory of the package:

$ python -m pip install .

On Unix, you can obtain the package source code and install it without leaving your terminal:

$ # change X.X.X to the desired version
$ wget https://pypi.python.org/packages/source/y/yeadon/yeadon-X.X.X.tar.gz
$ tar -zxfv yeadon-X.X.X.tar.gz
$ cd yeadon-X.X.X.tar.gz
$ python -m pip install .

Run the tests with:

$ pytest

Building the documentation

You can build the yeadon HTML documentation if you have Sphinx by typing the following from the root directory of the yeadon source files:

$ cd doc/
$ make html

You can open the documentation in your favorite web browser:

$ firefox _build/html/index.html

If you have a LaTeX distribution installed you can build the LaTeX docs with:

$ cd doc/
$ make latexpdf

and view the document with your preferred PDF viewer:

$ evince _build/latex/yeadon.pdf

Note that to generate documentation, one also needs the numpydoc package. Alternatively, one can just access the documentation through the PyPi site.

Usage

Once the package is installed you can start the program with:

$ yeadon

If you have MayaVi installed, the GUI will launch. If you don’t, the text based UI will launch. You can explicitly specify whether you want to load the GUI or the UI with command-line flags:

$ yeadon --gui
$ yeadon --ui

You can also interact with yeadon in a Python interpreter session or Python script/module via the API by importing the package. For example:

$ python
>>> import yeadon

Now you can create a human object with:

>>> human = yeadon.Human(<measfilename>, <CFGfilename>)

where <measfilename> and <CFGfilename> are replaced by strings that contain a relative or absolute path to the appropriate input .txt files. For more basics on how to use a Human object, you can go into a python command prompt and type:

>>> help(yeadon.Human)

or see the documentation.

You can also start the UI or the GUI from within a Python interpreter by executing:

>>> yeadon.start_ui()

or:

>>> yeadon.start_gui()

See the documentation for more information.

Cite us!

If you make use of the yeadon software we would welcome a citation in your publications. Please cite this software paper:

Dembia C, Moore JK and Hubbard M. An object oriented implementation of the Yeadon human inertia model, F1000Research 2014, 3:223 (doi: https://dx.doi.org/10.12688/f1000research.5292.1)

Contact

Feel free to contact Chris Dembia (chris530d, gmail) with any questions or comments.

All development is handled at https://github.com/chrisdembia/yeadon, including issue tracking.

Release files for yeadon 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yeadon 2.0.0
File Size Uploaded
yeadon-2.0.0.tar.gz 611.7 kB Details

Release files / yeadon-2.0.0.tar.gz

Download URL yeadon-2.0.0.tar.gz
Size 611.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d97469e37bcebb66dab941bba042f9c7b224f996d0bbcf3cca74efc2682bcea2
BLAKE2b-256 checksum
How to use checksums
48cfd02de0cbacc1de2d0e8ef2358cdd89b2c17fd2514fb66e12463409785909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

2.0.0 This release

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.1

2 release files

1.2.0

2 release files

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.95

1 release file

0.9

1 release file

0.8

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page