Skip to content

Commit

Permalink
Merge 052c5b2 into dff97f9
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Jun 6, 2020
2 parents dff97f9 + 052c5b2 commit c809d06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spectral_cube/io/fits.py
Expand Up @@ -235,7 +235,10 @@ def write_fits_cube(cube, filename, overwrite=False,
hdulist[0].header.add_history("Written by spectral_cube v{version} on "
"{date}".format(version=SPECTRAL_CUBE_VERSION,
date=now))
hdulist.writeto(filename)
try:
hdulist.writeto(filename, overwrite=overwrite)
except TypeError:
hdulist.writeto(filename, clobber=overwrite)
else:
raise NotImplementedError()

Expand Down
10 changes: 10 additions & 0 deletions spectral_cube/spectral_cube.py
Expand Up @@ -3828,6 +3828,16 @@ def __getattribute__(self, attrname):
else:
return super(VRSC, self).__getattribute__(attrname)

@property
def header(self):
header = super(VaryingResolutionSpectralCube, self).header

# this indicates to CASA that there is a beam table
header['CASAMBM'] = True

return header


@property
def hdu(self):
raise ValueError("For VaryingResolutionSpectralCube's, use hdulist "
Expand Down

0 comments on commit c809d06

Please sign in to comment.