From ed98f4db8302a68d3661a146144f3854e0cdf659 Mon Sep 17 00:00:00 2001 From: hack Date: Wed, 4 May 2011 13:43:40 +0000 Subject: Very minor change to the logic for determining when to add new rows to the WCSCORR table to (try to) insure that the last row will always be blank for use in initializing the new empty rows which get added to the old table. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12718 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 c344851..61f8461 100644 --- a/wcsutil/wcscorr.py +++ b/wcsutil/wcscorr.py @@ -310,7 +310,7 @@ def update_wcscorr(dest, source=None, extname='SCI', wcs_id=None): 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]: + 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 = pyfits.new_table(old_table.columns,header=old_table.header, -- cgit