Skip to content

Commit

Permalink
Fix angle offset in moments
Browse files Browse the repository at this point in the history
  • Loading branch information
aymgal committed Apr 16, 2024
1 parent 0bb2bd2 commit b58f039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coolest/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit b58f039

Please sign in to comment.