Skip to main content

Calculator with uncertainties

Project description

u-calc: A calculator with uncertainties

Tired of doing physics calculations by hand or with spreadsheets? Look no further, because this python module is here to make these calculations as easy as ever!

HOW TO

A simple use case: adding two numbers with uncertainties.

Let's say x = (23.00 +- 0.01) and y = (12.02 +- 0.03).

Open up the python interpreter and:

>>> from u_calc.measurement import Measurement as Msm
>>> x = Msm(23.00, 0.01)
>>> y = Msm(12.02, 0.03)
>>> print(x+y)
35.020 \pm 0.032

In your python files, you can just import this module just like any other.

Installation

To install it, you only need pip. Example for v0.0.1:

$ pip install u-calc==0.0.1

If you want to install the latest version from this repo, you need to:

  • git clone this repository(using http or ssh)
  • Make sure you're in the master branch
  • Run pip install -e . in the repository root(likely to be a directory called u_calc/) to create a symlink
  • You're finished!:smile:

Note: sometimes, you might have to use python3 -m pip instead of just pip. You can read about this here

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

u-calc-0.0.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

u_calc-0.0.3-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file u-calc-0.0.3.tar.gz.

File metadata

  • Download URL: u-calc-0.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for u-calc-0.0.3.tar.gz
Algorithm Hash digest
SHA256 75b98e71042edda774ae57f917c973ebaadcd32ee91103ce6b5baa8b0b3d4f47
MD5 81435f40bd2c7b900d05b85214e5675a
BLAKE2b-256 84f08b8ca7e36009ea16e13a38fd2ce5f140e53f7b70f8210e0eb73d3cfe41f6

See more details on using hashes here.

File details

Details for the file u_calc-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: u_calc-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for u_calc-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 71ed60818065fb49283505e745b2a6538787d055db13fa3cfcd6306b0d844231
MD5 e8a176d46bc69e0901007fea0d71228b
BLAKE2b-256 41aecea8e203916c46593e7362f061f472cd5a33d68e9110349681789f98829a

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