Skip to content

Commit

Permalink
fix sip reading problem with wcs key.
Browse files Browse the repository at this point in the history
  • Loading branch information
fockez committed Jul 17, 2017
1 parent f398cee commit e46106a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astropy/wcs/wcs.py
Expand Up @@ -1106,12 +1106,12 @@ def _read_sip_kw(self, header, wcskey=""):
if a is None and b is None and ap is None and bp is None:
return None

if str("CRPIX1") not in header or str("CRPIX2") not in header:
if str("CRPIX1"+wcskey) not in header or str("CRPIX2"+wcskey) not in header:
raise ValueError(
"Header has SIP keywords without CRPIX keywords")

crpix1 = header.get("CRPIX1")
crpix2 = header.get("CRPIX2")
crpix1 = header.get("CRPIX1"+wcskey)
crpix2 = header.get("CRPIX2"+wcskey)

return Sip(a, b, ap, bp, (crpix1, crpix2))

Expand Down

0 comments on commit e46106a

Please sign in to comment.