Skip to content

Commit

Permalink
Merge pull request #557 from simonsobs/wcs_resolutions
Browse files Browse the repository at this point in the history
Wcs resolutions
  • Loading branch information
mhasself authored Oct 10, 2023
2 parents 54adeed + 6d88170 commit 019e79c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sotodlib/coords/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ def get_wcs_kernel(proj, ra=None, dec=None, res=None):
if proj == 'car':
wcs.wcs.crpix = [1.0, 0.5]

# Check if the resolution is sensible, for SHTs
res = res * 180./np.pi # Easier to do this check in degs
div = 90./res - np.round(90./res)
if abs(div) > 1e-8:
raise ValueError(f"The requested resolution {res} deg does not divide 90 deg evenly.")

return wcs


Expand Down

0 comments on commit 019e79c

Please sign in to comment.