diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/utilities/nttools/gtedit/gtupdate.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
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 + |