aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/setranges.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/twodspec/multispec/setranges.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/multispec/setranges.x')
-rw-r--r--noao/twodspec/multispec/setranges.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/noao/twodspec/multispec/setranges.x b/noao/twodspec/multispec/setranges.x
new file mode 100644
index 00000000..46247a08
--- /dev/null
+++ b/noao/twodspec/multispec/setranges.x
@@ -0,0 +1,23 @@
+include "ms.h"
+
+# SET_RANGES -- Set profile starting range array.
+#
+# The ranges array relates the starting point of the profiles relative
+# to the center of profile and relative to the image line. For more
+# details see the MULTISPEC system documentation.
+
+procedure set_ranges (ms, lower, ranges, nspectra)
+
+pointer ms # MULTISPEC data structure
+real lower # Relative lower limit of profiles
+real ranges[nspectra, LEN_RANGES] # Ranges array to be set
+int nspectra # Number of spectra
+
+int i
+
+begin
+ do i = 1, nspectra {
+ ranges[i, X_START] = int (PARAMETER(ms, X0, i)) + lower
+ ranges[i, DX_START] = ranges[i, X_START] - PARAMETER(ms, X0, i)
+ }
+end