Turning Point Analyzer
Overview
The Turning Point Analyzer is a Python package for analyzing turning points in trajectories and calculating transition probabilities.
Installation
You can install the Turning Point Analyzer package using pip:
pip install turning-points
Usage
To use the Turning Point Analyzer in your Python code, you can import it as follows:
from turning_points import TurningPointAnalyzer
Analyzing Turning Points
from turning_points import TurningPointAnalyzer
# Example trajectory data
trajectories = [
[(0, 0), (1, 1), (2, 2), (3, 1), (4, 0)], # Example trajectory 1
[(0, 0), (1, -1), (2, -2), (3, -1), (4, 0)] # Example trajectory 2
]
# Create a TurningPointAnalyzer instance
analyzer = TurningPointAnalyzer(trajectories)
# Plot transition directions
analyzer.plot_transition()
# Plot frequency distribution of time between turns
analyzer.plot_frequency()
# Get the probability of same turn direction
probability = analyzer.get_proba_same_turn()
print("Probability of same turn direction:", probability)
# Get the results
results = analyzer.get_results()
print("Results:", results)
Testing
To run tests for the Turning Point Analyzer, you can use the following command:
pytest
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citing
If you use this package for your publication, don't hesitate to cite it. example provided in citations.md
thanks for the RDP algorythm
The package use the Ramer–Douglas–Peucker algorithm. It was obtained from: https://github.com/fhirschmann/rdp
Metadata
Release files for turning-points 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| turning_points-0.0.5.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| turning_points-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.3 kB
Release files / turning_points-0.0.5.tar.gz
| Download URL | turning_points-0.0.5.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bfc8d487d3d34c6f54d24657d9d2af3dbd89cf46bfdbf590bbb4e00d54f9121
|
|
BLAKE2b-256 checksum How to use checksums |
077bd9918ce6a30a2ac720072f3f13b6b5bd643564064159e8a505fdbeb91706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.13
|
Release files / turning_points-0.0.5-py3-none-any.whl
| Download URL | turning_points-0.0.5-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bd1aed115e9fda7c38f427faaf5ad727bdbf29d8b3a10598c199d09f8606ea5
|
|
BLAKE2b-256 checksum How to use checksums |
d44a3e9ceabb5b7dd48c6c2045ee318396dc3dcfd3b29fde3bd5b6ff095d0ae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.13
|