From 8fb1c5f247291d57742df198ad98a67976b73924 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Thu, 5 Nov 2020 15:00:07 +0100 Subject: [PATCH] Fix lorentz correction --- pyzebra/ccl_io.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyzebra/ccl_io.py b/pyzebra/ccl_io.py index fbac1dc..d378ee8 100644 --- a/pyzebra/ccl_io.py +++ b/pyzebra/ccl_io.py @@ -224,6 +224,10 @@ def correction(value, lorentz=True, zebra_mode="--", ang1=0, ang2=0): if lorentz is False: return value else: + # convert to rad + ang1 = ang1 * np.pi / 180 + ang2 = ang2 * np.pi / 180 + if zebra_mode == "bi": corr_value = np.abs(value * np.sin(ang1)) return corr_value