We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 624606a commit af799adCopy full SHA for af799ad
mctools/__init__.py
@@ -2,9 +2,14 @@
2
__all__ = ["common", "fluka", "mcnp", "phits" ]
3
4
import subprocess, os, sys
5
-from math import sqrt
+from math import sqrt, log10, floor
6
import numpy as np
7
8
+def printValErr(val, err):
9
+ """ Print value and its error in the () notation """
10
+ tmp=-floor(log10(err))
11
+ print('{:.{prec}f}({:.0f})'.format(val, floor(err * (10**tmp)), prec=tmp))
12
+
13
def L2E(l, m=1.674927351e-27): #constants.physical_constants['neutron mass'][0]):
14
"""
15
Angstrom to MeV converter.
0 commit comments