From 4f92dfbd2757dcc1a3ee92cd515ec5eb242dd8f9 Mon Sep 17 00:00:00 2001 From: hack Date: Thu, 21 Apr 2011 21:45:00 +0000 Subject: Updated the 'wcscorr' module in stwcs.wcsutil to define the number of new rows (pad_rows) to add to the table when there are not enough to record the new WCS solutions. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12529 fe389314-cf27-0410-b35b-8c050e845b92 --- wcsutil/wcscorr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wcsutil/wcscorr.py') diff --git a/wcsutil/wcscorr.py b/wcsutil/wcscorr.py index 527f289..4f5a05d 100644 --- a/wcsutil/wcscorr.py +++ b/wcsutil/wcscorr.py @@ -305,12 +305,12 @@ def update_wcscorr(dest, source=None, extname='SCI', wcs_id=None): # Now, we need to merge this into the existing table rowind = find_wcscorr_row(old_table.data, {'wcs_id':''}) - old_nrows = np.where(rowind)[0][0] new_nrows = new_table.data.shape[0] # check to see if there is room for the new row if (old_nrows + new_nrows) > old_table.data.shape[0]: + pad_rows = 5 * new_nrows # if not, create a new table with 'pad_rows' new empty rows upd_table = pyfits.new_table(old_table.columns, nrows=old_table.data.shape[0] + pad_rows) -- cgit