diff options
author | hack <hack@stsci.edu> | 2011-04-21 17:45:00 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-04-21 17:45:00 -0400 |
commit | 4f92dfbd2757dcc1a3ee92cd515ec5eb242dd8f9 (patch) | |
tree | 4037dd9a483087b72198124e9b7485aa8016aa58 /wcsutil/wcscorr.py | |
parent | 1222f265a3f0db0e6612ff50711f834fbbd39b7b (diff) | |
download | stwcs_hcf-4f92dfbd2757dcc1a3ee92cd515ec5eb242dd8f9.tar.gz |
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
Diffstat (limited to 'wcsutil/wcscorr.py')
-rw-r--r-- | wcsutil/wcscorr.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |