Skip to main content

Special relativity physics library for Python

Project description

SpacetimeLib

SpacetimeLib is a special relativity physics library for Python.

SpacetimeLib performs mathematical operations on events, velocities, and worldlines in N+1 Minkowski spacetime.

You can calculate Lorentz transformations, time dilation, length contraction, and more.

Documentation and getting started

The documentation for the latest main branch is found here: https://kurtamohler.github.io/spacetimelib/

The Start Here - Twin Paradox tutorial page is a good starting point to see what SpacetimeLib can do.

Installation

Pip

pip install spacetimelib

From source

Install Miniconda: instructions

Clone SpacetimeLib the repository.

https://github.com/kurtamohler/spacetimelib.git && cd spacetimelib

Run the following to create and activate an environment with all dependencies.

conda env create -f environment.yaml -n spacetimelib && conda activate spacetimelib

Then install SpacetimeLib.

pip install -e .

How to import SpacetimeLib

To access SpacetimeLib, import it into your Python code:

>>> import spacetimelib as st

Shorten the imported name to st for better code readability, but you can just use the unshortened name if you want.

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

spacetimelib-0.0.2.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacetimelib-0.0.2-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spacetimelib-0.0.2.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for spacetimelib-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2a2ba918f2f10762409b73bfcac4c812690e33b558ac00b66574a66cfe349226
MD5 535386a4cc51b52da53014d9cd8b5b0f
BLAKE2b-256 5170a2b60310f16ecd5a83a92a41b7e15e98dcebe4ec0b51217fb3c5ea5fe783

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spacetimelib-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for spacetimelib-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0a97917a64e4fd76ecac0ee656628796f52a10d8825cc5222e40307e66167c0
MD5 8a671a642d808af7679bf6940ea5d2bc
BLAKE2b-256 d24570c7989a38160ebe87c5dfe9f3a8604bd56b84b53f91a29bc8f27495104f

See more details on using hashes here.

Supported by

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