aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-12-10 23:10:12 +0800
committerAaron LI <aly@aaronly.me>2017-12-10 23:10:12 +0800
commitaf31cc7223f5ac42ef5e71b1ddc93a412e4535dc (patch)
tree02b6a634c5f4b9239ef97f13b2f9d43963e961cf
parent302fced198ae7bdef49490cd423baa106d4875ba (diff)
downloadatoolbox-af31cc7223f5ac42ef5e71b1ddc93a412e4535dc.tar.bz2
astro/fitsimage.py: update new pixel size calculation
-rwxr-xr-xastro/fits/fitsimage.py4
1 files changed, 2 insertions, 2 deletions
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)