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 /noao/digiphot/apphot/aplib/apnew.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/aplib/apnew.x')
-rw-r--r-- | noao/digiphot/apphot/aplib/apnew.x | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/aplib/apnew.x b/noao/digiphot/apphot/aplib/apnew.x new file mode 100644 index 00000000..b5da6fc1 --- /dev/null +++ b/noao/digiphot/apphot/aplib/apnew.x @@ -0,0 +1,46 @@ +include "../lib/apphot.h" + +# APNEW -- Procedure to determine whether the current star is the same as +# the previous star and/or whether the current star belongs to the coordinate +# list or not. + +int procedure apnew (ap, wx, wy, xlist, ylist, newlist) + +pointer ap # pointer to the apphot structure +real wx # x cursor coordinate +real wy # y cursor coordinate +real xlist # x list coordinate +real ylist # y list coordinate +int newlist # integer new list + +bool fp_equalr() +int newobject +real deltaxy +real apstatr() + +begin + deltaxy = apstatr (ap, FWHMPSF) * apstatr (ap, SCALE) + + if (newlist == NO) { + if (! fp_equalr (wx, apstatr (ap, WX)) || ! fp_equalr (wy, + apstatr (ap, WY))) + newobject = YES + else + newobject = NO + } else if ((abs (xlist - wx) <= deltaxy) && + (abs (ylist - wy) <= deltaxy)) { + wx = xlist + wy = ylist + newobject = NO + } else if (fp_equalr (wx, apstatr (ap, WX)) && fp_equalr (wy, + apstatr (ap, WY))) { + wx = xlist + wy = ylist + newobject = NO + } else { + newlist = NO + newobject = YES + } + + return (newobject) +end |