From af31cc7223f5ac42ef5e71b1ddc93a412e4535dc Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 10 Dec 2017 23:10:12 +0800 Subject: astro/fitsimage.py: update new pixel size calculation --- astro/fits/fitsimage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'astro/fits') diff --git a/astro/fits/fitsimage.py b/astro/fits/fitsimage.py index 22f066c..c83f02f 100755 --- a/astro/fits/fitsimage.py +++ b/astro/fits/fitsimage.py @@ -144,7 +144,7 @@ class FITSImage: pixelsize_old = self.pixelsize self.image = ndimage.zoom(self.image, zoom=zoom, order=order) - self.pixelsize = pixelsize_old / zoom[0] + self.pixelsize = pixelsize_old * (self.Nx / Nx2) return self.image def write(self, outfile, clobber=False): @@ -266,7 +266,7 @@ def cmd_zoom(args): print("Interpolation order: %d" % args.order) print("Zoomed image size: %dx%d" % (args.size, args.size)) fimage.zoom(newsize=args.size, order=args.order) - print("Zoomed image pixel size: %.1f [arcsec]" % pixelsize) + print("Zoomed image pixel size: %.1f [arcsec]" % fimage.pixelsize) fimage.write(args.outfile, clobber=args.clobber) print("Saved zoomed FITS image to: %s" % args.outfile) -- cgit v1.2.2