Open Splines opened 9 months ago
Res(1.5, 0.1, r"\milli\meter") # 1.50 +- 0.10
Res(0.0005, 0.1, r"\meter", autoprefix=True) # 0.5 mm oder 500 um
Res(0.5, sys=0.1, stat=0.2)
Res(0.5, errors=[Error(0.2, "stat1"), Error(0.3, "stat2"), Error(0.4, "sys")])
Res(1.5, 0.1, r"\milli\meter", sigfigs=2) # 1.5 +- 0.1
Res(1.5, 0.1, r"\milli\meter", decimal_places=2) # 1.50 +- 0.10
vw.res("laenge", 1.5, r"\mm")
wiz.res("abw", 1.5, r"\sigma")
wiz.resint("i", i)
wiz.printByDefault()
@paul019 What do you think? Do we want to allow that uncertainties can have units separated from the value? E.g. when an uncertainty is so small, you'd want to have "mm" instead of "m" just for the uncertainty. Is that a valid use case? It would definitely make the logic more complicated which is why I'm a bit reluctant right now.
Edit: we discussed this in person and came to the conclusion that this is not necessary. That is, we want uncertainties to be represented in the unit of the main value.
What we wish to have as features:
Res
object to give our results: numerical value, error, unit,sigfigs
), this overrides the logic of the program: usually it determines the number of decimal places based on the "error value", but withsigfigs
specified, it will base this decision off the "main value"plt
interface frommatplotlib
pm
inqty
and arbitrary string such that we can do things like(1.0 +- 0.1) \cdot 10^2
-> outsource as much as possible tosiunitx
, use\num{..}
; if we have to implement this on our own: allow internationalization for the $\cdot$ sign, e.g. use $\times$ in AEresint
, e.g. wiz.resint("i", i)wizLaengeValueOnly
, see #11wiz.printByDefault()
orwiz.res("laenge", 5, 0.01).print()
get_latex()
value only
wiz.export()
wiz.clear()
as workaround for #6Edit:
\qty
vs.\SI
, especially assert compatibility with thephysics
packageres
call. AND: option to automatically recreate theresults.tex
upon everyres
call.TODO