Skip to main content

Helpers for empirical data handling and plotting

Project description

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.

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

physics_utils-0.4.0.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

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

physics_utils-0.4.0-py3-none-any.whl (49.3 kB view details)

Uploaded Python 3

File details

Details for the file physics_utils-0.4.0.tar.gz.

File metadata

  • Download URL: physics_utils-0.4.0.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for physics_utils-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dbb883f9f19109816e664a3d1d4eb6185642704be9415aeb0967f50b19e3a1c0
MD5 6d3526a2a9b8b0f04e66f1dc9325189c
BLAKE2b-256 e5843886b1f1bbdb3b7db5de2000df56cc2afe618fa28b9d6780d89c1a1380cc

See more details on using hashes here.

File details

Details for the file physics_utils-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: physics_utils-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 49.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for physics_utils-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed4bca04dea20f9c170811e91a7663d6836f4c133aa25d0e97042121d4dcbbfe
MD5 902eb2c181428d4d6fd2558b7bd68d64
BLAKE2b-256 2cb1f63680a3b7e49e6af837b66bf94d2ec1fa593ef230d4221e0d7f743808ac

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