diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/utilities/nttools/gtedit/gtupdate.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/gtedit/gtupdate.x')
-rw-r--r-- | pkg/utilities/nttools/gtedit/gtupdate.x | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/gtedit/gtupdate.x b/pkg/utilities/nttools/gtedit/gtupdate.x new file mode 100644 index 00000000..7308c38f --- /dev/null +++ b/pkg/utilities/nttools/gtedit/gtupdate.x @@ -0,0 +1,36 @@ +# GT_UPDATE -- Delete points currently marked for deletion and update data + +procedure gt_update (tp, tpr, x, y, deleted, npix) + +pointer tp, tpr +real x[ARB] +real y[ARB] +int npix +int deleted[ARB] + +int i, j, ndelete + +begin + # Delete the points + call gt_dodel (tp, tpr, deleted, npix) + + # Update data arrays j = 0 + ndelete = 0 + for (i = 1; i <= npix; i = i + 1) { + j = j + 1 + if (deleted[i] == YES) { + ndelete = ndelete + 1 + i = i + 1 + while (deleted[i] == YES) { + ndelete = ndelete + 1 + i = i + 1 + } + } + x[j] = x[i] + y[j] = y[i] + } + + call aclri (deleted, npix) + npix = npix - ndelete +end + |