https://github.com/echo724/srelativity-py
Python Module for Calculating Special Relativity using Minkowski Matrix
https://github.com/echo724/srelativity-py
Last synced: over 1 year ago
JSON representation
Python Module for Calculating Special Relativity using Minkowski Matrix
- Host: GitHub
- URL: https://github.com/echo724/srelativity-py
- Owner: echo724
- License: mit
- Created: 2020-03-06T05:36:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-06T08:15:54.000Z (about 6 years ago)
- Last Synced: 2025-01-19T17:57:26.921Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# srelativity-py
A Python Module for special relativity mathematics. **srelativity-py** is using the symbolic math library **[sympy](https://www.sympy.org/en/index.html)**.
srelativity-py is made for calculating events by Lorentz Transformations used in Special Relativity. Using srelativity-py will help for getting a value of Lorentz factor, calculating event in moving frame, and dot product with two events in the Minkowski space.
## Dependencies
The following dependencies are required
- [sympy](https://www.sympy.org/en/index.html)
## Download
$ git clone https://github.com/eunchan1001/srelativity-py.git
## Example
from srelativity import *
foo = LT(0.6) # makes Lorentz Transformation object with velocity 0.6(c)
foo.rest(1,2) # makes event in rest frame (x,ct) coordinate
foo.moving() # returns the coordinate of moving frame (x',ct')
foo.gamma() # returns Lorentz factor 𝜸
event2 = vec(2,1) # makes vector (2,1)
foo.dot(event2) # returns dot product with Minkowski metric
foo.inv() # returns inverse event coordinate
foo.lt() # returns Lorentz Transformation sympy matrix (Map)