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.

Files for u-calc, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size u_calc-0.0.3-py3-none-any.whl (16.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size u-calc-0.0.3.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page