summaryrefslogtreecommitdiff
path: root/stwcs/wcsutil
diff options
context:
space:
mode:
Diffstat (limited to 'stwcs/wcsutil')
-rw-r--r--stwcs/wcsutil/altwcs.py2
-rw-r--r--stwcs/wcsutil/wcscorr.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/stwcs/wcsutil/altwcs.py b/stwcs/wcsutil/altwcs.py
index 2d1565d..043d535 100644
--- a/stwcs/wcsutil/altwcs.py
+++ b/stwcs/wcsutil/altwcs.py
@@ -561,7 +561,7 @@ def convertAltWCS(fobj, ext, oldkey=" ", newkey=' '):
cname = card
else:
cname = card.rstrip(oldkey)
- hdr.rename_key(card, cname + newkey, force=True)
+ hdr.rename_keyword(card, cname + newkey, force=True)
return hdr
diff --git a/stwcs/wcsutil/wcscorr.py b/stwcs/wcsutil/wcscorr.py
index 48a1978..397e6a8 100644
--- a/stwcs/wcsutil/wcscorr.py
+++ b/stwcs/wcsutil/wcscorr.py
@@ -409,8 +409,8 @@ def update_wcscorr(dest, source=None, extname='SCI', wcs_id=None, active=True):
if (old_nrows + new_nrows) > old_table.data.shape[0] - 1:
pad_rows = 2 * new_nrows
# if not, create a new table with 'pad_rows' new empty rows
- upd_table = fits.new_table(old_table.columns, header=old_table.header,
- nrows=old_table.data.shape[0] + pad_rows)
+ upd_table = fits.BinTableHDU.from_columns(old_table.columns, header=old_table.header,
+ nrows=old_table.data.shape[0] + pad_rows)
else:
upd_table = old_table
pad_rows = 0
@@ -542,7 +542,7 @@ def create_wcscorr(descrip=False, numrows=1, padding=0):
dtype='S128')))
# Now create the new table from the column definitions
- newtab = fits.new_table(fits.ColDefs(col_list), nrows=trows)
+ newtab = fits.BinTableHDU.from_columns(fits.ColDefs(col_list), nrows=trows)
# The fact that setting .name is necessary should be considered a bug in
# pyfits.
# TODO: Make sure this is fixed in pyfits, then remove this