Kineticstoolkit

Latest version: v0.15.0

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.5

can be transformed into a TimeSeries using:


some_timeseries = ktk.TimeSeries(some_list)


It works for any other array-like such as nested lists, NumPy arrays, Pandas Series, Pandas DataFrames. It can also be used to create copies of TimeSeries.

New TimeSeries.add_data method

The new `TimeSeries.add_data` method now complements its siblings `TimeSeries.rename_data` and `TimeSeries.remove_data`. Using this method ensures that the added data is compatible with the data already present in the TimeSeries (e.g., it has the same dimension across the time dimension) and that you specify wether or not existing data of the same name must be overwritten.

New overwrite option to TimeSeries.add_data_info

A new parameter `overwrite` has been added to `TimeSeries.add_data_info` so that you can specify wether or not already existing data info of the same name must be overwritten.


Improvements

Improved TimeSeries assignations

It is now possible to assign any array-like value to a TimeSeries' time or data property; it will be converted automatically to a proper NumPy array.

Improved parameter checking

Parameter checking has been generally improved, so that if you make a mistake, you will be more likely to get a helpful error message.

Warning on non-interactive mode

You will now get a warning if you attempt to use an interactive Matplotlib object (e.g., the Player, or a GUI-based method) without having configured Matplotlib to be interactive.

1.0

All core features have been implemented and most of them have a stable API. Therefore, I am happy to announce that we enter a new development phase, which is a steady walk toward version 1.0. What does this means?
1. The current API (public classes, modules, functions) is now in "improvement" mode. No current feature will be removed anymore until version 1.0. In rare circumstances, you may get deprecation warnings that indicate that a given feature will be removed in version 1.0 or later, but these warnings will last for a minimum of 24 months before the feature is actually removed, to ensure that everybody has time to update their code. Generally this was already the case, but this is now a rule that will be enforced systematically.
2. Most new features will now be developed as Kinetics Toolkit extensions. This will draw a clear line between the stable core API and open research applications. Some future extensions may then be integrated into the core if they are stable and relevant for general-purpose biomechanical analysis.

New feature

- TimeSeries.resample now accepts a new frequency in Hz in addition to a new time attribute. We can now resample a TimeSeries to a new sampling frequency very easily: `ts.resample(120)`.

Bugfixes

- Saving a C3D with missing values now works.
- No more warning in ktk.Player in Python >= 3.10.
- Fixed deprecation message in deprecated function TimeSeries.get_event_time.
- Added missing TimeSeries methods in the TimeSeries' dir, for better autocompletion in IDEs.

API changes

- Removed `fill_value` parameter from TimeSeries.resample. Now:
- The resampled has nan where the original signal had nan.
- Resampling on a larger time span now always works, but there is no extrapolation: bound values are filled with nan systematically.
- Player.to_html5 has been removed. This was an internal feature for documentation generation, that should not be part of the public API.

0.15.0

New features

- TimeSeries.resample now has an `extrapolate` boolean parameter.
- ktk.read_c3d: Now reads transform series (rotation parameter) such as segment orientations.
- ktk.write_c3d: Now writes transform series (rotation parameter) such as segment orientations.

Enhancements

- TimeSeries.merge now has an option to warn or raise an error in case of conflict (when a data key of the same name is found in both TimeSeries).
- TimeSeries: Some clarifications in TimeSeries methods' docstrings
- ktk.read_c3d: If multiple trajectories with a same name are found in a C3D file (which may happen in labelling markers trajectories with occlusion), integer numbers are now added as suffixes to the data key. For example, if a C3D file has duplicate trajectories with a same name (e.g., "T8"), the resulting TimeSeries will have those data keys, one for each trajectory: "T8", "T8_1", "T8_2", etc. The previous inconvenient behaviour was to silently choose one trajectory and ignore every other.
- ktk.write_c3d now generates an error if the output file name does not end with ".c3d".

Bugfixes

- Now works with NumPy 2.0
- ktk.read_c3d: Fixed a possible bug if a c3d files has events but no points.
- ktk.read_c3d: Fixed a bug in c3d files with no units.

Note

- Deprecated functions that were scheduled to be removed in 2024 have been removed.

Thanks

- Thanks to Alek050 and pariterre for their contribution to this release on the new support for rotations in ktk.read_c3d and ktk.write_c3d.
- Thanks to j-heizenreder regarding to issue 231 on ktk.read_c3d error.

0.14.3

Kinetics Toolkit 0.14.3 has been released. This is a small bugfix release with no new feature.

What's Changed
* FIX: fixed the analogs/points sampling rate comparison by andreyzhd in https://github.com/kineticstoolkit/kineticstoolkit/pull/236
* Fixed bug on first index of fill_missing_samples by Alek050 in https://github.com/kineticstoolkit/kineticstoolkit/pull/239
* Deprecated features scheduled to be removed in 2024 have been removed.

New Contributors
* andreyzhd made their first contribution in https://github.com/kineticstoolkit/kineticstoolkit/pull/236

**Full Changelog**: https://github.com/kineticstoolkit/kineticstoolkit/compare/0.14.2...0.14.3

0.14.2

Bugfix in Player's interconnections

0.14.0

New features

Scripting API for the Player

The Player can now be entirely scripted:

- Get/set the TimeSeries to be visualized using `Player.get_contents()` and `Player.set_contents()`
- Get/set the point interconnections using `Player.get_interconnections()` and `Player.set_interconnections()`
- Play/pause using `Player.play()` and `Player.pause()`
- Access and modify all settings using properties such as `current_index`, `current_time`, `target`, `zoom`, `elevation`, `azimuth`, etc.

Styling the Player

Every element can now be stylized using properties such as `background_color`, `default_point_color`, `point_size`, `frame_size`, `frame_width`, `grid_size`, `grid_subdivision_size`, etc.

Exporting the Player's content to images and videos

You can now export the Player's content to image files such as PNG, JPEG, PDF, SVG or TIFF using `Player.to_image()`, or to MP4 videos using `Player.to_video()`. This, combined to styling, should help you giving nice presentations!

Standard views in the Player

By defining which axes (x, y, z, -x, -y, -z) correspond to the up and anterior direction using the `up` and `anterior` properties, you can now switch to standard orthogonal views using `Player.set_view()`. For example: `p.set_view("front")`, `p.set_view("top")`, `p.set_view("right")`, etc. These views are also available interactively using number keys 1 to 6.

Convert anything to a TimeSeries

It is now easier than never to create a TimeSeries. For instance, a list of data:

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.