added angle conversion shorrtcuts deg and rad

This commit is contained in:
Marco Cammarata 2017-01-17 19:20:07 +01:00
parent 55a4403971
commit eab1bcdb26
1 changed files with 8 additions and 0 deletions

View File

@ -986,6 +986,14 @@ def convert(value=1,unit="eV",out="nm"):
if (unit == "eV") & (out =="nm"):
return 1239.8/value
def deg(rad):
""" convert radians to deg """
return np.rad2deg(rad)
def deg(rad):
""" convert deg to radians"""
return np.deg2rad(deg)
### IMINUIT RELATED ###