File: sumspec

package info (click to toggle)
iraf-rvsao 2.8.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,220 kB
  • sloc: lisp: 592; ansic: 397; fortran: 366; makefile: 13; sh: 4
file content (102 lines) | stat: -rwxr-xr-x 2,585 bytes parent folder | download | duplicates (2)
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
93
94
95
96
97
98
99
100
101
102
#!/data/oir/IRAF2.16.1/bin.linux64/cl.e -f
# This script runs SUMSPEC from a Unix command line
# Replace the path in the first line with one appropriate to your machine
# November 13, 2020
# By Jessica Mink

string uprm, hm, tempcom

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

# 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 == "") {
    print ("SUMSPEC: Add spectra, shift them, and/or remove continua")
    print ("usage: sumspec spectra compfile [other arguments]")
    print ("       sumspec help  for IRAF help")
    print ("       sumspec dpar  to dump parameters")
    print ("       sumspec epar  to edit parameters")
    print ("       sumspec lpar  to list parameters")
    }
else if (args == "help") {
    tempcom = mktemp ("tempsumspec")
    print ("help sumspec", > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }

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

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

# List sumspec parameters using lpar
else if (args == "lpar") {
    tempcom = mktemp ("tempsumspec")
    print ("rvsao motd-\nlpar sumspec", > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }

# Execute sumspec using the arguments on the command line
else {
    tempcom = mktemp ("tempsumspec")
    printf ("rvsao motd-\nsumspec %s\n", args, > tempcom)
    cl (< tempcom)
    delete (tempcom)
    }
logout

# Mar 31 2009	New shell command line script
# Nov 13 2020	Switch from IRAF 2.14.1 to IRAF 2.16.1