Welcome to DynamicistToolKit’s documentation!¶
Contents:
DynamicistToolKit¶
PyPi |
|
Anaconda |
|
Documentation |
|
Continous Integration |
Introduction¶
This is a collection of Python modules which contain tools that are helpful for a dynamics. We use it at the TU Delft Bicycle Lab as an initial shared location to house reusable tools for the group. These tools may eventually graduate to packages of their own or be incorporated into other existing specialized packages.
Modules¶
- bicycle
Generic tools for basic bicycle dynamics analysis.
- control
Functions helpful in control systems analysis.
- inertia
Various functions for calculating and manipulating inertial quantities.
- process
Various tools for common signal processing tasks.
Installation¶
You can install DynamicistToolKit with conda:
$ conda install -c conda-forge dynamicisttoolkit
or pip:
$ python -m pip install DynamicistToolKit
Or download the source with your preferred method and install manually.
Using Git:
$ git clone git@github.com:moorepants/DynamicistToolKit.git
$ cd DynamicistToolKit
Or wget:
$ wget https://github.com/moorepants/DynamicistToolKit/archive/master.zip
$ unzip master.zip
$ cd DynamicistToolKit-master
Then for basic installation:
$ python setup.py install
Or install for development purposes:
$ python setup.py develop
Tests¶
Run the unit tests with pytest:
$ pytest dtk
and doctests with:
$ pytest --doctest-modules dtk
Documentation¶
The documentation is hosted at ReadTheDocs:
http://dynamicisttoolkit.readthedocs.org
You can build the documentation if you have Sphinx and numpydoc:
$ cd docs
$ make html
$ firefox _build/html/index.html
To locally build on Windows, open an Anaconda prompt (the base environment has sphinx and numpydoc installed), navigate to the DynamicistToolKit directory and execute:
$ cd docs
$ make.bat html
$ start "" ".\_build\html\index.html"
Contributing¶
The name of this distribution is “DynamicistToolKit” but it is best to think of it as a shared collection of tested tools for the TU Delft Bicycle Lab. Our primary audience is ourselves, but since this is public it may garner other users if we make anything more broadly useful. So most anything useful to the science and engineering we do can go in here. Secondly, think of this as a first location to graduate useful tools you have written for your own research.
There are several guidelines we should follow to ensure we can use this as a shared dependency in our work:
Do not change input/output behavior of any function, method, or class if it has been released (version pushed to PyPi & Conda Forge).
If you absolutely have to change input/ouput behavior then, first, consider making a new function with your desired behavior or, secondly, deprecate the function for at least 1 year and at least 1 version release with a deprecation warning.
If a function produces the incorrect (mathematical) result you may change the output without deprecation (in general).
Functions, methods, classes, modules that start with a single underscore
_
are considered private and you may change the input/output behavior. Everything else is considered public and the API is frozen when we release the software.All additions must include docstrings with at least one example of use and enough unit tests to protect against regressions, i.e. ensure that the input/output API cannot be changed without tests failing.
If we follow these basic guidelines we should have a relatively stable tool that we can all use and not worry about our code breaking when others do work on it.
Release Notes¶
0.6.1¶
Include
make.bat
in the source tarball.Make compatible with NumPy 2.0. [PR #53]
0.6.0¶
Drop support for Python <3.8 and bumped dependency versions to match Ubuntu 22.04. [PR #40]
Changed the correction factor in
butterworth
to a digital filter correction instead of the prior used analog factor (backwards incompatible output). [PR #43]Add new functions
pow_spectrum
andcumulative_power_spectrum
. [PR #45]Switched testing framework from nose (fails on Python 3.12) to pytest. [PR #46]
Display the control module functions in the Sphinx documentation. [PR #47]
Removed numpy.matrix in favor of numpy.array, which may lead to possible backwards incompatible outputs.
Added examples to all functions with doctests and improved docstring quality.
Repaired some functions to actually produce what they were designed to produce with the new dependencies (there was some rather archaic plotting code mostly).
Switched CI from Travis to Github Actions.
Removed old Vagrant based installation options.
0.5.3¶
Added the license and readme to the source distriubtion.
0.5.2¶
Screwed up pypi upload on 0.5.1, so bumping one more time.
0.5.1¶
Import nanmean from numpy instead of scipy and fix float slices. [PR #34]
0.5.0¶
0.4.0¶
0.3.5¶
Fixed bug in coefficient_of_determination. [PR #23]
0.3.4¶
Fixed bug in normalized cutoff frequency calculation. [PR #21]
0.3.2¶
Fixed bug in butterworth function and added tests.
0.3.1¶
Fixed butterworth to work with SciPy 0.9.0. [PR #18]
0.3.0¶
Removed pandas dependency.
Improved time vector function.
Removed gait analysis code (walk.py), now at http://github.com/csu-hmc/Gait-Analysis-Toolkit.
TravisCI tests now run, added image to readme.
Added documentation at ReadTheDocs.
0.2.0¶
Addition of walking dynamics module.
0.1.0¶
Original code base that was used for the computations in this dissertation: https://github.com/moorepants/dissertation