Skip to content

A wrapper to combine the uncertainties package with astropy units

License

Notifications You must be signed in to change notification settings

mtlam/astrouncertainties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

astrouncertainties

A wrapper to combine the uncertainties package with astropy units.

BEWARE: there is still a problem with correlations, i.e., x - x**2 returns different errors than x * (1-x)

Requires:
astropy
uncertainties

AUVariable

A class for handling either a value and error pair or an array pair

Usage:

>>> from astrouncertainties import *
>>> x = AUVariable([1,2,3],[1,1,1],"m")
>>> y = AUVariable([0.005,0.005,0.007],[0.001,0.001,0.001],units.km)
>>> z = x+y
>>> print z
[6.0+/-1.4142135623730951 7.0+/-1.4142135623730951 10.0+/-1.4142135623730951]*m

About

A wrapper to combine the uncertainties package with astropy units

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages