rotation-plots3d
A package written in Python 3.12 to assist with generating 3D plots and statistical analysis of time series X, Y, Z, roll, pitch, yaw data.
Description
This package contains methods to generate 3D plots of x, y, z, roll, pitch, yaw data and analyze for repeatability of measurements using a gage repeatability method. It will also generate a stats dataframe for the x, y, z, roll, pitch, yaw and x-prime, y-prime, and z-prime axes.
Installation
To install this python package locally, please use:
pip install rotation-plots3d
Basic Usage
The following examples provide a high-level summary of how to use the API.
Instantitating the OTA Class
Create the ObjectTrackingAnimation class and run the format_raw_data() method.
from rotation_plots3d import ObjectTrackingAnimation
ota = ObjectTrackingAnimation(input_path='files', graph_title="My Creative Title")
Load Data and Create a Graph
ota.load() # loads data into the class as an attribute
ota.create_graph('example.csv','1')
# will generate a plot of the example.csv file located in the output_path directory.
Run Statistics on Data
import os
files = os.listdir('files')
# create a list of every output file repeated by the number
# of dataranges per file. In this case 8x.
filenames = []
for file in files:
filenames += 8 * [file]
# indicate which device to track for each file. In this case, it is
# device "1" for every file.
device = ['1'] * len(filenames)
# for each file, create a list of start and stop time ranges
datarange = [[0,3],[3,6],[6,9],[9,12],[145,150],[150,155],[155,160],[160,165]]
# create the stats dataframe
df = ota.stats_dataframe(filename=filenames,device=device,datarange=datarange)
print(df)
# Parameter mean ... angle_of_shift_degrees_vs_initial angle_of_shift_degrees_vs_initial_error
# 0 X 2.401588 ... NaN NaN
# 1 X 2.401905 ... NaN NaN
# 2 X 2.402598 ... NaN NaN
# 3 X 2.403336 ... NaN NaN
# 4 X 2.391486 ... NaN NaN
# .. ... ... ... ... ...
# 3 z_prime [0.6388455401133175, 0.00028297720143531126, -... ... 0.057028 0.000948
# 4 z_prime [0.6446987414563102, 0.002794264889296324, -0.... ... 0.405209 0.000726
# 5 z_prime [0.6440696849596658, 0.0028438830124556712, -0... ... 0.362399 0.000474
# 6 z_prime [0.6499854657845796, -0.0005017454685925038, -... ... 0.781513 0.175948
# 7 z_prime [0.6443998187565277, 0.0021319551787689173, -0... ... 0.372250 0.013982
# generate gage repeatability reports
ota.gage_repeatability(filename=filenames,device=device,datarange=datarange)
# will return 6 matplotlib plots and print the following to the console:
# StdDev (SD) StudyVar (6*SD) % Study Var
# Source
# Gage Repeatability 0.000256 0.001539 6.922392
# Part to Part 0.003696 0.022175 99.760115
# Total variation 0.003705 0.022228 100.000000
# Automotive Industry Action Group (AIAG) measurement system assessment:
# -------------------
# Total Gage Repeatability factor: 6.922
# <10% --> Acceptable measurement system
Authors and acknowledgment
John Glauber
johnbglauber@gmail.com
This software relies heavily upon the Plotly package and the pyPETB package. A huge thanks to those teams for creating such awesome tools.
License
MIT.
Project status
In development.
Metadata
Release files for rotation-plots3d 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rotation_plots3d-0.0.1.tar.gz | 14.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rotation_plots3d-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.4 kB
Release files / rotation_plots3d-0.0.1.tar.gz
| Download URL | rotation_plots3d-0.0.1.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e900dfaef119b8b3f67aae6c16c7fcefddfd6d52531cfe575175a130fa15f8cf
|
|
BLAKE2b-256 checksum How to use checksums |
c2642f9907008958242cec9bf29f5cf16380c055e7bfa3632f24944c1755b421
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / rotation_plots3d-0.0.1-py3-none-any.whl
| Download URL | rotation_plots3d-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c91e96ba5b183bc6a2287332d2910e883cddfb0ae80a0a7d1b2c86ba2654921
|
|
BLAKE2b-256 checksum How to use checksums |
f6622bdd8500563f72366888cd07c22387c186bb13fec60382f134bc054cdad7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|