diff options
author | Aaron LI <aly@aaronly.me> | 2017-12-10 23:21:01 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-12-10 23:21:01 +0800 |
commit | 48923e3afd3b8ee049b199d352e2912dceca5476 (patch) | |
tree | 0f4e25080f325cc1e03b2890d51a57ddb6388dc0 | |
parent | af31cc7223f5ac42ef5e71b1ddc93a412e4535dc (diff) | |
download | atoolbox-48923e3afd3b8ee049b199d352e2912dceca5476.tar.bz2 |
astro/fitsimage.py: allow the absence of CDELT{1,2} keywords
-rwxr-xr-x | astro/fits/fitsimage.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/astro/fits/fitsimage.py b/astro/fits/fitsimage.py index c83f02f..6238f60 100755 --- a/astro/fits/fitsimage.py +++ b/astro/fits/fitsimage.py @@ -103,8 +103,11 @@ class FITSImage: self._pixelsize = value # Update header self.header["PixSize"] = value # [arcsec] - self.header["CDELT1"] *= value / oldvalue - self.header["CDELT2"] *= value / oldvalue + try: + self.header["CDELT1"] *= value / oldvalue + self.header["CDELT2"] *= value / oldvalue + except KeyError: + pass @property def fov(self): |