asymmetric_uncertainty
A package for handling numeric quantities with asymmetric uncertainties.
Science Score: 18.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
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.8%) to scientific vocabulary
Keywords
Repository
A package for handling numeric quantities with asymmetric uncertainties.
Basic Info
- Host: GitHub
- Owner: cgobat
- License: gpl-3.0
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://github.com/cgobat/asymmetric_uncertainty/wiki
- Size: 198 KB
Statistics
- Stars: 18
- Watchers: 3
- Forks: 4
- Open Issues: 4
- Releases: 0
Topics
Metadata Files
README.md
Asymmetric Uncertainty
Many values and quantities in science and engineering have associated uncertainties—for example, $3.0\pm0.3$ expresses a quantity whose measured or expected value is 3.0, but might reasonably be expected[^1] to have a true value anywhere between 2.7 and 3.3. This is a symmetric uncertainty, because the error is the same to either side of the central value. However, not all numbers behave this way: for example, we could write $3.0_{-0.4}^{+0.2}$ to signify that although the expected value is 3.0 as well, the magnitude of the uncertainty to the left and right of this value are not equivalent.
Usage
This repository contains the asymmetric_uncertainty Python package, which provides the a_u class for dealing with these kinds of numbers in practice. After installation, usage is very simple:
```python
from asymmetricuncertainty import au x = a_u(3.0, 0.2, 0.4) print(x + 1)
4.0 (+0.2, -0.4) ```
Here we see how to create an instance of the class representing the example number given before: $3.0_{-0.4}^{+0.2}$. The initialization arguments are the nominal value, positive error, and negative error—in that order. x will play nicely with other numeric objects under most mathematical operations, and its errors will propagate appropriately. More complete examples can be found in the example.ipynb Jupyter notebook.
Installation
If you have a local installation of Git, you can install this package with a single command: run pip install git+https://github.com/cgobat/asymmetric_uncertainty.git to install the latest version.
Otherwise, clone/download this repository, then (from a command line running within the associated directory) run pip install . or python setup.py install.
asymmetric_uncertainty should then be available as a module that you can import like any other.
Documentation
The majority of the documentation that has been written for this package thus far is contained in the wiki associated with this repository. Supplemental information, such as related works, the mathematical basis of this implementation, and further background reading, can be found in the supporting materials document.
Citing this project
If you make use of this package in your own work, please cite it by referencing its entry in ASCL, the Astrophysics Source Code Library: ascl:2208.005. Citation information can also be exported from ADS (2022ascl.soft08005G) or the sidebar of this repository.
[^1]: Definitions and conventions for what this means vary. Common uses/interpretations include standard deviation, standard deviation divided by the square root of the number of samples (often called standard error), 90% confidence interval, etc. As long as usage is consistent and intentions are clear, any of these are valid.
Owner
- Name: Caden Gobat
- Login: cgobat
- Kind: user
- Location: Boulder, CO
- Company: Southwest Research Institute
- Website: https://cgobat.github.io/
- Repositories: 6
- Profile: https://github.com/cgobat
Space scientist & data analyst
Citation (CITATION.bib)
If you make use of this software in your own work, please cite it with a
reference to its ASCL identifier (ascl:2208.005) and/or ADS bibcode
(2022ascl.soft08005G). A suggested citation is provided below in BibTeX
format. Feel free to contact the author with any attribution questions.
@misc{2022ascl.soft08005G,
author = {{Gobat}, Caden},
title = {{Asymmetric Uncertainty}: Handling nonstandard
numerical uncertainties},
keywords = {Software},
howpublished = {Astrophysics Source Code Library},
year = 2022,
month = aug,
eid = {ascl:2208.005},
pages = {ascl:2208.005},
archiveprefix = {ascl},
eprint = {2208.005},
url = {http://ascl.net/2208.005},
adsurl = {https://ui.adsabs.harvard.edu/abs/2022ascl.soft08005G},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
GitHub Events
Total
- Push event: 4
Last Year
- Push event: 4
Dependencies
- numpy *
- actions/checkout v3 composite
- actions/setup-python v3 composite