aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/setranges.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/twodspec/multispec/setranges.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
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