aboutsummaryrefslogtreecommitdiff
path: root/noao/nproto/ir/iriinit.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/nproto/ir/iriinit.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/nproto/ir/iriinit.x')
-rw-r--r--noao/nproto/ir/iriinit.x28
1 files changed, 28 insertions, 0 deletions
diff --git a/noao/nproto/ir/iriinit.x b/noao/nproto/ir/iriinit.x
new file mode 100644
index 00000000..a97ade8e
--- /dev/null
+++ b/noao/nproto/ir/iriinit.x
@@ -0,0 +1,28 @@
+# IR_VECINIT -- Procedure to initialize the intensity matching algorithm.
+# If the ranges are undefined and no matching is to take place the
+# ishifts are set to INDEFR and the routine returns. Otherwise the shifts
+# are all initialized to zero and shifts for the missing subrasters are
+# set to INDEFR.
+
+procedure ir_vecinit (deltai, nsubrasters, ranges)
+
+real deltai[ARB] # intensity shifts
+int nsubrasters # number of subrasters
+int ranges[ARB] # ranges of missing subrasters
+
+int num
+int get_next_number()
+
+begin
+ # Initialize the shifts to INDEFR.
+ call amovkr (INDEFR, deltai, nsubrasters)
+ if (ranges[1] == NULL)
+ return
+
+ num = 0
+ while (get_next_number (ranges, num) != EOF) {
+ if (num > nsubrasters)
+ break
+ deltai[num] = 0.0
+ }
+end