From b58f0391c3ba66202ca518c323d5f4324071db52 Mon Sep 17 00:00:00 2001 From: Aymeric Galan Date: Tue, 16 Apr 2024 09:41:54 +0200 Subject: [PATCH] Fix angle offset in moments --- coolest/api/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolest/api/util.py b/coolest/api/util.py index a54347f..2e41723 100644 --- a/coolest/api/util.py +++ b/coolest/api/util.py @@ -215,7 +215,7 @@ def ellipticity_from_moments(light_map, pixel_size): q = np.sqrt(lambda_2 / lambda_1) # b/a, axis ratio phi = np.arctan(2. * mu_11_ / (mu_20_ - mu_02_)) / 2. # position angle if mu_02_ > mu_20_: - phi += np.pi # makes it consistent angles conventions in COOLEST + phi += np.pi / 2. # makes it consistent angles conventions in COOLEST return phi, q