diff options
author | Aaron LI <aly@aaronly.me> | 2017-06-11 20:06:48 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-06-11 20:06:48 +0800 |
commit | 1016aa1d4c431e78adff87f725976211f1cd119b (patch) | |
tree | e051e72cda92b001d2ee8d58278631e496e782af | |
parent | 156ea20569bc166e217b53e0e4eb5f668314633e (diff) | |
download | atoolbox-1016aa1d4c431e78adff87f725976211f1cd119b.tar.bz2 |
astro/fits/fitscube.py: Fix a astropy.io.fits write warning
-rwxr-xr-x | astro/fits/fitscube.py | 5 |
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): |