https://github.com/cfosseprez/turning_points

Module to find and analyze turning points in trajectories

https://github.com/cfosseprez/turning_points

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Module to find and analyze turning points in trajectories

Basic Info
  • Host: GitHub
  • Owner: cfosseprez
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 24.4 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

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: bash pip install turning_points

Usage

To use the Turning Point Analyzer in your Python code, you can import it as follows:

pytho from turning_points import TurningPointAnalyzer

Analyzing Turning Points ```python 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.getprobasame_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:

bash 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

Owner

  • Name: Charles Fosseprez
  • Login: cfosseprez
  • Kind: user

3 meter, greenish eyes, charming

Citation (citations.md)

Cite turning_points as:
Charles Fosseprez (2024) turning_points [Source code].
https://github.com/lesptizami/turning_points  
Package author note:  
"""Package to find turning points in trajectories
"""  
author = "Charles Fosseprez"  
email = "charles.fosseprez.me@gmail.com"  

GitHub Events

Total
Last Year