aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/daophot/allstar/dpglim.x
diff options
context:
space:
mode:
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