aboutsummaryrefslogtreecommitdiff
path: root/noao/imred/quadred/src/ccdproc/ccdnscan.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/imred/quadred/src/ccdproc/ccdnscan.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/imred/quadred/src/ccdproc/ccdnscan.x')
-rw-r--r--noao/imred/quadred/src/ccdproc/ccdnscan.x38
1 files changed, 38 insertions, 0 deletions
diff --git a/noao/imred/quadred/src/ccdproc/ccdnscan.x b/noao/imred/quadred/src/ccdproc/ccdnscan.x
new file mode 100644
index 00000000..3a9fbeba
--- /dev/null
+++ b/noao/imred/quadred/src/ccdproc/ccdnscan.x
@@ -0,0 +1,38 @@
+include "ccdtypes.h"
+
+
+# CCDNSCAN -- Return the number CCD scan rows.
+#
+# If not found in the header return the "nscan" parameter for objects and
+# 1 for calibration images.
+
+int procedure ccdnscan (im, ccdtype)
+
+pointer im #I Image
+int ccdtype #I CCD type
+int nscan #O Number of scan lines
+
+bool clgetb()
+char type, clgetc()
+int hdmgeti(), clgeti()
+
+begin
+ iferr (nscan = hdmgeti (im, "nscanrow")) {
+ switch (ccdtype) {
+ case ZERO, DARK, FLAT, ILLUM, FRINGE:
+ nscan = 1
+ default:
+ type = clgetc ("scantype")
+ if (type == 's')
+ nscan = clgeti ("nscan")
+ else {
+ if (clgetb ("scancor"))
+ nscan = INDEFI
+ else
+ nscan = 1
+ }
+ }
+ }
+
+ return (nscan)
+end