From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- 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