Skip to main content

PyPI - Version Static Badge Python Tests

PhysicsTools

This is a library for dealing with some tedious tasks for basic physics labs.

Be warned that, as this project is still in heavy development, backwards compatability can be broken between 0.x.0 versions. This is avoided as much as possible, but make sure to watch out for it when updating your installation.

Features

  • Automatic uncertainty propagation on basic arithmetic and trigonometric operations
  • Generated LaTeX steps of any calculations done with the MeasuredData class
  • A physics scripting language for fast usage of the library
  • Graping wrappers that take numbers with uncertainty for automatic error bars
  • LaTeX data table generators

Installation

Look under the examples folder to see the library in use.

physics_utils can be installed straight from PyPI using pip, like so:

python3 -m pip install physics-utils

Usage

To get started with using the library, you can import MeasuredData from physics_utils and begin doing calculations like normal once your numbers are wrapped:

from physics_utils import MeasuredData

print(MeasuredData(2, 0.5) * MeasuredData(3, 0.4)) # 6±2.

To start using the scripting language, you can type python3 -m physics_utils.script in your terminal to start the interpreter, or python3 -m physics_utils.script <filename> to run a file. To do the same as the example above in the physics script interpreter, you'd just need to type this:

>>> 2~0.5 * 3~0.4
6±2.

And there are a number of other helpful features built into the language.

For more information on using the package, take a look at the documentation and examples.

Metadata

Release files for physics-utils 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for physics-utils 0.4.1
File Size Uploaded
physics_utils-0.4.1.tar.gz 44.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for physics-utils 0.4.1
File Interpreter ABI Platform
physics_utils-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 93.3 kB

Release files / physics_utils-0.4.1.tar.gz

Download URL physics_utils-0.4.1.tar.gz
Size 44.1 kB
Tags Source
SHA-256 checksum
How to use checksums
435c59da9b5557e5fe5b919f413c8cd4d78d2c8b438149a52f5338d226bfad5d
BLAKE2b-256 checksum
How to use checksums
1a9a4331e7014788a6f4f3bab05ba8ea80dfb298a817eb4b539bcd34d28d1db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / physics_utils-0.4.1-py3-none-any.whl

Download URL physics_utils-0.4.1-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf6188c14e73a205c07f36e7d7c4baff610a52fe3133070b4f4b1aefd313442c
BLAKE2b-256 checksum
How to use checksums
99762afa30c98f33e2316293640cd2778858b1ef3dee06f3e7bfaf123fada43a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page