aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/daophot/allstar/dpglim.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/digiphot/daophot/allstar/dpglim.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/digiphot/daophot/allstar/dpglim.x')
-rw-r--r--noao/digiphot/daophot/allstar/dpglim.x17
1 files changed, 17 insertions, 0 deletions
diff --git a/noao/digiphot/daophot/allstar/dpglim.x b/noao/digiphot/daophot/allstar/dpglim.x
new file mode 100644
index 00000000..d5f1fedb
--- /dev/null
+++ b/noao/digiphot/daophot/allstar/dpglim.x
@@ -0,0 +1,17 @@
+# DP_GLIM -- Get the lower and upper limits of a section around a specified
+# center.
+
+procedure dp_glim (xc, yc, radius, ixmin, ixmax, iymin, iymax, lx, mx, ly, my)
+
+real xc, yc # the x and y center points
+real radius # the radial distance
+int ixmin, ixmax # absolute x boundaries
+int iymin, iymax # absolute y boundaries
+int lx, mx, ly, my # the returned limits
+
+begin
+ lx = max (ixmin - 1, min (ixmax, int (xc - radius))) + 1
+ mx = max (ixmin, min (ixmax, int (xc + radius)))
+ ly = max (iymin - 1, min (iymax, int (yc - radius))) + 1
+ my = max (iymin, min (iymax, int (yc + radius)))
+end