From 430e4ebf49e5b731b7549b8dba2b4b6866ba6f8a Mon Sep 17 00:00:00 2001 From: Nadia Dencheva Date: Wed, 28 Sep 2016 12:11:27 -0400 Subject: use correct call to create a table --- stwcs/wcsutil/wcscorr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stwcs/wcsutil/wcscorr.py b/stwcs/wcsutil/wcscorr.py index e018ae0..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.from_columns(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.from_columns(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 -- cgit