diff options
-rw-r--r-- | stwcs/wcsutil/altwcs.py | 2 | ||||
-rw-r--r-- | stwcs/wcsutil/wcscorr.py | 4 |
2 files changed, 3 insertions, 3 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..e018ae0 100644 --- a/stwcs/wcsutil/wcscorr.py +++ b/stwcs/wcsutil/wcscorr.py @@ -409,7 +409,7 @@ 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, + upd_table = fits.from_columns(old_table.columns, header=old_table.header, nrows=old_table.data.shape[0] + pad_rows) else: upd_table = old_table @@ -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.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 |