File: contsum

package info (click to toggle)
iraf-rvsao 2.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 16,456 kB
  • sloc: ansic: 963; lisp: 651; fortran: 397; makefile: 27
file content (92 lines) | stat: -rwxr-xr-x 2,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/data/oir/IRAF2.14.1/iraf/bin.redhat/ecl.e -f
# This script runs RVSAO.CONTSUM from a Unix command line
# Replace the path in the first line with one appropriate to your machine
# March 31, 2009
# By Doug Mink

string uprm, hm, tempcom

# Set machine type appropriately
set arch=".redhat"

# Set the terminal type.
if (envget("TERM") == "sun") {
    stty gterm
} else if (envget("TERM") == "xterm") {
    stty xterm
} else if (envget("TERM") == "network") {
    stty vt100
} else {
    stty xterm
}

# Set the IRAF home and parameter directories
if (defvar("irafhome")) {
    hm = envget("irafhome")
    i = strlen(hm)
    if (substr(hm, i, i) == "/")  
        set (home = hm)
    else
        set (home = hm // "/")
    set uparm = "home$uparm/"
    }
else {
    hm = envget ("HOME")
    set (home = hm // "/IRAF/")
    set uparm = "home$uparm/"
    }

if (defvar("UPARM")) {
    uprm = envget("UPARM")
    i = strlen(uprm)
    if (substr(uprm, i, i) == "/")  
        set (uparm = uprm)
    else
        set (uparm = uprm // "/")
  }

# Set the user name which may appear on graphical output
if (envget("USER") != "") {
    set user = envget("USER")
    }

if (args == "help") {
    tempcom = mktemp ("tempcontsum")
    print ("help contsum", > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }

# Edit contsum parameters using epar
else if (args == "epar") {
    tempcom = mktemp ("tempcontsum")
    print ("rvsao motd-\nepar contsum", > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }

# Dump contsum parameters using dpar
else if (args == "dpar") {
    tempcom = mktemp ("tempcontsum")
    print ("rvsao motd-\ndpar contsum", > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }

# List contsum parameters using lpar
else if (args == "lpar") {
    tempcom = mktemp ("tempcontsum")
    print ("rvsao motd-\nlpar contsum", > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }
else {
    print ("CONTSUM:  Set parameters for RVSAO SUMSPEC continuum removal")
    print ("usage: contsum help  for IRAF help")
    print ("       contsum dpar  to dump parameters")
    print ("       contsum epar  to edit parameters")
    print ("       contsum lpar  to list parameters")
    }

logout