From 48923e3afd3b8ee049b199d352e2912dceca5476 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 10 Dec 2017 23:21:01 +0800 Subject: astro/fitsimage.py: allow the absence of CDELT{1,2} keywords --- astro/fits/fitsimage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'astro/fits') 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): -- cgit v1.2.2