diff options
author | Aaron LI <aly@aaronly.me> | 2017-09-12 19:47:52 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-09-12 19:47:52 +0800 |
commit | f1560262d88a255fe4c63b8b4e7f171c4af12111 (patch) | |
tree | 6fe632c7ac66c0592004057154abd75854f1ce13 /astro | |
parent | 97bc6f61444c312c5326b5d6f5ed8771c8dfbeba (diff) | |
download | atoolbox-f1560262d88a255fe4c63b8b4e7f171c4af12111.tar.bz2 |
taper_sky.py: Convert input image to be float32
Diffstat (limited to 'astro')
-rwxr-xr-x | astro/oskar/taper_sky.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/astro/oskar/taper_sky.py b/astro/oskar/taper_sky.py index 282fe66..f70b47c 100755 --- a/astro/oskar/taper_sky.py +++ b/astro/oskar/taper_sky.py @@ -147,8 +147,8 @@ def main(): args.outfile_taper) with fits.open(args.infile) as f: - image = f[0].data - header = f[0].header + image = f[0].data.astype(np.float32) + header = f[0].header.copy(strip=True) logger.info("Read sky image from file: %s" % args.infile) L = args.Router @@ -189,7 +189,7 @@ def main(): header["OBJECT"] = ("Tukey Window", "Taper window") header["Rinner"] = (args.Rinner, "[pixel] inner radius") header["Router"] = (args.Router, "[pixel] outer radius") - hdu = fits.PrimaryHDU(data=taper, header=header) + hdu = fits.PrimaryHDU(data=taper.astype(np.float32), header=header) hdu.writeto(args.outfile_taper) logger.info("Wrote tapered to file: %s" % args.outfile_taper) |