Measurements
Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.
Science Score: 64.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
2 of 22 committers (9.1%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.
Basic Info
- Host: GitHub
- Owner: JuliaPhysics
- License: mit
- Language: Julia
- Default Branch: master
- Homepage: https://juliaphysics.github.io/Measurements.jl/stable/
- Size: 25.8 MB
Statistics
- Stars: 509
- Watchers: 12
- Forks: 41
- Open Issues: 26
- Releases: 23
Topics
Metadata Files
README.md
Measurements.jl
| Documentation | Build Status | Code Coverage | Quality |
|:---------------------------------------:|:-----------------------------------:|:-------------------------------:|:-----------:|
| |
|
|
|
|
| |
|
Introduction
What Is This Package Useful For?

Image credit: "xkcd: Error Bars" (CC-BY-NC 2.5)
Physical measures are typically reported with an error, a quantification of the uncertainty of the accuracy of the measurement. Whenever you perform mathematical operations involving these quantities you have also to propagate the uncertainty, so that the resulting number will also have an attached error to quantify the confidence about its accuracy. Measurements.jl relieves you from the hassle of propagating uncertainties coming from physical measurements, when performing mathematical operations involving them. The linear error propagation theory is employed to propagate the errors.
This library is written in Julia, a modern high-level, high-performance dynamic programming language designed for technical computing.
When used in the Julia interactive session, it can serve also as an easy-to-use calculator.
Features List
- Support for most mathematical operations available in Julia standard library
and special functions
from
SpecialFunctions.jlpackage, involving real and complex numbers. All existing functions that acceptAbstractFloat(andComplex{AbstractFloat}as well) arguments and internally use already supported functions can in turn perform calculations involving numbers with uncertainties without being redefined. This greatly enhances the power ofMeasurements.jlwithout effort for the users - Functional correlation between variables is correctly handled, so
x-x ≈ zero(x),x/x ≈ one(x),tan(x) ≈ sin(x)/cos(x),cis(x) ≈ exp(im*x), etc... - Support for arbitrary precision (also called multiple precision) numbers with uncertainties. This is useful for measurements with very low relative error
- Define arrays of measurements and perform calculations with them. Some linear algebra functions work out-of-the-box
- Propagate uncertainty for any function of real arguments (including functions
based on
C/Fortran calls),
using
@uncertainmacro - Function to get the derivative and the gradient of an expression with respect to one or more independent measurements
- Functions to calculate standard score and weighted mean
- Parse strings to create measurement objects
- Easy way to attach the uncertainty to a number using the
±sign as infix operator. This syntactic sugar makes the code more readable and visually appealing - Extensible in combination with external packages: you can propagate errors of
measurements with their physical units, perform numerical integration
with
QuadGK.jl, numerical and automatic differentiation, and much more. - Integration with
Plots.jl.
The method used to handle functional correlation is described in this paper:
- M. Giordano, 2016, "Uncertainty propagation with functionally correlated
quantities", arXiv:1610.08716
(Bibcode:
2016arXiv161008716G)
A current limitation of the package is that it is not yet possible to define quantities related by a correlation matrix.
If you use use this package for your research, please cite it.
Documentation
The complete manual of Measurements.jl is available at
https://juliaphysics.github.io/Measurements.jl/stable/. There, people
interested in the details of the package, in order integrate the package in
their workflow, can find a technical appendix explaining how the package
internally works.
Installation
The latest version of Measurements.jl is available for Julia v1.0 and later
releases, and can be installed with Julia built-in package
manager. In a Julia session, after
entering the package manager mode with ], run the command
julia
pkg> update
pkg> add Measurements
Older versions of this package are also available for Julia 0.4-0.7.
Usage
After installing the package, you can start using it with
julia
using Measurements
The module defines a new Measurement data type. Measurement objects can be
created with the two following constructors:
julia
measurement(value, uncertainty)
value ± uncertainty
where
valueis the nominal value of the measurementuncertaintyis its uncertainty, assumed to be a standard deviation.
Here is a quick taster of the functionalities of the package:
``` julia julia> using Measurements
julia> a = measurement(4.5, 0.1) 4.5 ± 0.1
julia> b = 3.8 ± 0.4 3.8 ± 0.4
julia> 2a + b 12.8 ± 0.4472135954999579
julia> x = 8.4 ± 0.7
julia> x - x 0.0 ± 0.0
julia> x/x 1.0 ± 0.0
julia> xxx - x^3 0.0 ± 0.0
julia> sin(x)/cos(x) - tan(x) -2.220446049250313e-16 ± 0.0 # They are equal within numerical accuracy ```
For more details about the use of the package read the documentation, in particular the Usage and Examples sections.
License
The Measurements.jl package is licensed under the MIT "Expat" License. The
original author is Mosè Giordano.
Please, cite the paper Giordano 2016 (http://arxiv.org/abs/1610.08716) if you
employ this package in your research work. For your convenience, a BibTeX entry
is provided in the CITATION.bib file.
Owner
- Name: JuliaPhysics
- Login: JuliaPhysics
- Kind: organization
- Website: http://juliaphysics.github.io
- Repositories: 13
- Profile: https://github.com/JuliaPhysics
Physics in Julia
Citation (CITATION.bib)
@ARTICLE{Measurements.jl-2016,
author = {{Giordano}, Mos{\`e}},
title = "{Uncertainty propagation with functionally correlated
quantities}",
journal = {ArXiv e-prints},
archivePrefix ="arXiv",
eprint = {1610.08716},
primaryClass = "physics.data-an",
keywords = {Physics - Data Analysis, Statistics and Probability},
year = 2016,
month = oct,
adsurl = {https://ui.adsabs.harvard.edu/abs/2016arXiv161008716G},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
GitHub Events
Total
- Create event: 8
- Commit comment event: 5
- Release event: 3
- Issues event: 5
- Watch event: 25
- Delete event: 7
- Issue comment event: 49
- Push event: 30
- Pull request review event: 14
- Pull request review comment event: 15
- Pull request event: 17
- Fork event: 4
Last Year
- Create event: 8
- Commit comment event: 5
- Release event: 3
- Issues event: 5
- Watch event: 25
- Delete event: 7
- Issue comment event: 49
- Push event: 30
- Pull request review event: 14
- Pull request review comment event: 15
- Pull request event: 17
- Fork event: 4
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Mosè Giordano | m****e@g****g | 384 |
| dependabot[bot] | 4****] | 5 |
| Pietro Monticone | 3****e | 3 |
| Twan Koolen | k****n@g****m | 3 |
| simeonschaub | s****9@g****m | 3 |
| Rogerluo | h****r@q****m | 2 |
| Alex Ames | a****s@g****m | 2 |
| Andrés Riedemann | 3****0 | 2 |
| Eben60 | 6****0 | 2 |
| George Datseris | d****e@g****m | 2 |
| github-actions[bot] | 4****] | 2 |
| C. Brenhin Keller | c****r@d****u | 1 |
| Elliot Saba | s****t@g****m | 1 |
| Hendrik Ranocha | r****a | 1 |
| Julia TagBot | 5****t | 1 |
| Lukas | l****b@a****v | 1 |
| Michael Krabbe Borregaard | m****d@s****k | 1 |
| Miles Cranmer | m****r@g****m | 1 |
| Morten Piibeleht | m****t@g****m | 1 |
| Simon Christ | S****t@g****e | 1 |
| Valentin Churavy | v****y | 1 |
| abhro | 5****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 62
- Total pull requests: 95
- Average time to close issues: 3 months
- Average time to close pull requests: about 1 month
- Total issue authors: 57
- Total pull request authors: 20
- Average comments per issue: 3.53
- Average comments per pull request: 2.79
- Merged pull requests: 82
- Bot issues: 0
- Bot pull requests: 10
Past Year
- Issues: 4
- Pull requests: 21
- Average time to close issues: 1 day
- Average time to close pull requests: 1 day
- Issue authors: 4
- Pull request authors: 7
- Average comments per issue: 2.75
- Average comments per pull request: 2.05
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 4
Top Authors
Issue Authors
- giordano (3)
- longemen3000 (2)
- Boxylmer (2)
- MartinOtter (2)
- jmarcellopereira (1)
- bertulli (1)
- timmyfaraday (1)
- CITESmike2018 (1)
- mmikhasenko (1)
- LebedevRI (1)
- scheidan (1)
- Mattriks (1)
- BeastyBlacksmith (1)
- briochemc (1)
- alusiani (1)
Pull Request Authors
- giordano (49)
- dependabot[bot] (7)
- github-actions[bot] (6)
- longemen3000 (5)
- FerreolS (4)
- simeonschaub (4)
- pitmonticone (3)
- Roger-luo (2)
- abhro (2)
- LebedevRI (2)
- stillyslalom (2)
- vchuravy (2)
- brenhinkeller (2)
- Eben60 (2)
- kapple19 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 1,387 total
- Total dependent packages: 68
- Total dependent repositories: 18
- Total versions: 22
juliahub.com: Measurements
Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.
- Homepage: https://juliaphysics.github.io/Measurements.jl/stable/
- Documentation: https://docs.juliahub.com/General/Measurements/stable/
- License: MIT
-
Latest release: 2.14.0
published 9 months ago
Rankings
Dependencies
- JuliaRegistries/TagBot v1 composite
- actions/checkout v4 composite
- julia-actions/cache v1 composite
- julia-actions/setup-julia v1 composite
- actions/checkout v4 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-docdeploy releases/v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/julia-uploadcodecov v0.1 composite
- julia-actions/julia-uploadcoveralls v1.0 composite
- julia-actions/setup-julia latest composite
- julia-actions/setup-julia v1 composite