summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2011-05-04 09:43:40 -0400
committerhack <hack@stsci.edu>2011-05-04 09:43:40 -0400
commited98f4db8302a68d3661a146144f3854e0cdf659 (patch)
tree9444d15d40eaa6ca9f0066860a93e3e38e45c820
parentc523492a23e7962087aafc9e7a16120a2e8fa069 (diff)
downloadstwcs_hcf-ed98f4db8302a68d3661a146144f3854e0cdf659.tar.gz
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
-rw-r--r--wcsutil/wcscorr.py2
1 files changed, 1 insertions, 1 deletions
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,