aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-06-11 20:06:48 +0800
committerAaron LI <aly@aaronly.me>2017-06-11 20:06:48 +0800
commit1016aa1d4c431e78adff87f725976211f1cd119b (patch)
treee051e72cda92b001d2ee8d58278631e496e782af
parent156ea20569bc166e217b53e0e4eb5f668314633e (diff)
downloadatoolbox-1016aa1d4c431e78adff87f725976211f1cd119b.tar.bz2
astro/fits/fitscube.py: Fix a astropy.io.fits write warning
-rwxr-xr-xastro/fits/fitscube.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/astro/fits/fitscube.py b/astro/fits/fitscube.py
index f9a96e1..8effc75 100755
--- a/astro/fits/fitscube.py
+++ b/astro/fits/fitscube.py
@@ -68,7 +68,10 @@ class FITSCube:
def write(self, outfile, clobber):
hdu = fits.PrimaryHDU(data=self.data, header=self.header)
- hdu.writeto(outfile, clobber=clobber)
+ try:
+ hdu.writeto(outfile, overwrite=clobber)
+ except TypeError:
+ hdu.writeto(outfile, clobber=clobber)
@property
def width(self):