From eab1bcdb26ee9223e23af44980d1e681606f78c1 Mon Sep 17 00:00:00 2001 From: Marco Cammarata Date: Tue, 17 Jan 2017 19:20:07 +0100 Subject: [PATCH] added angle conversion shorrtcuts deg and rad --- mcutils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mcutils.py b/mcutils.py index d0d42a3..8031598 100644 --- a/mcutils.py +++ b/mcutils.py @@ -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 ###