Skip to content

Commit 8fb4afd

Browse files
author
Kazunori Akiyama
committed
Temporal fix to avoid a potential error attribute to a bug in astropy.io.fits
1 parent f4fff8f commit 8fb4afd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎smili/uvdata/uvfits/uvfits.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,11 @@ def _create_ghdu_single(self):
552552
bitpix=-32)
553553
ghdu = pf.GroupsHDU(gdata)
554554

555+
# this is fixing a latest bug in astropy (September 1)
556+
if ghdu.header["PCOUNT"] == 0:
557+
ghdu.header.set("PCOUNT", value=len(parnames))
558+
for i in range(len(parnames)):
559+
ghdu.header.set("PTYPE%d"%(i+1), value=parnames[i])
555560

556561
# CTYPE HEADER
557562
cards = []

0 commit comments

Comments
 (0)