From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- noao/digiphot/daophot/allstar/dpglim.x | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 noao/digiphot/daophot/allstar/dpglim.x (limited to 'noao/digiphot/daophot/allstar/dpglim.x') 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 -- cgit