Skip to content

Commit

Permalink
math clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
sbailey committed Aug 10, 2023
1 parent c07d845 commit 4b1cf9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions py/desispec/coaddition.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,14 @@ def calc_mean_std_ra_dec(ras, decs):
where the means are in degrees and the standard deviations are in arcsec,
including cos(dec) correction.
For efficiency, does not try to handle dec= +/-90 poles correctly
For efficiency, this does not try to handle dec= +/-90 poles correctly,
nor arbitrarily large spreads of angles. i.e. this is ok for a mean
of fiber positions scattered about a single target, but not for e.g.
a science analysis of the central location of a cluster of galaxies.
"""
ras = np.asarray(ras)
decs = np.asarray(decs)
if np.max(ras) > np.min(ras)+180:
if np.max(ras) - np.min(ras) > 180:
offset = 180.0
ras = (ras + offset) % 360
else:
Expand Down

0 comments on commit 4b1cf9f

Please sign in to comment.