Skip to main content

A package to find turing points in tracks, andd plot

Project description

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_point_analyzer

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

Project details


Download files

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

Source Distribution

turning_points-0.0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

turning_points-0.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file turning_points-0.0.2.tar.gz.

File metadata

  • Download URL: turning_points-0.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.13

File hashes

Hashes for turning_points-0.0.2.tar.gz
Algorithm Hash digest
SHA256 592f08b6c34f6172e75353bbff4faa9a3b4dd0157453049a03a560991837b03e
MD5 bb5b7dc01d350c34b16eb539dc814ab2
BLAKE2b-256 f76cd0f18c3e97683c7e59f91be60629781bb439b43fe5a021f0b3a37464e4ae

See more details on using hashes here.

File details

Details for the file turning_points-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for turning_points-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8fd856d5727b7615ff61e3a2162d39ebe9f2a884dc3c5730402faeeecf859336
MD5 4b4d84580f697d56a4ac3416cf01660e
BLAKE2b-256 10c3f0ec58944ba6f481af5434982cc4fe8890c419bc9d9fbfd48c2291cb6e5f

See more details on using hashes here.

Supported by

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