This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
show1.cl
54 lines (42 loc) · 1.49 KB
/
show1.cl
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
# SHOW1: 11SEP92 KMM
# SHOW1 - display 1 (sky-subtracted) sqiid frames
procedure show1 (first_image, frame)
string first_image {prompt="First image in sequentially numbered images"}
int frame {prompt="Display frame #"}
string sky {"null", prompt="sky frame"}
bool orient {no, prompt="Orient N up and E left?"}
bool zscale {yes, prompt="automatic zcale on each frame?"}
string ztrans {"linear", prompt="intensity transform: log|linear|none"}
real z1 {0.0, prompt="minimum intensity"}
real z2 {1000.0, prompt="maximum intensity"}
struct *l_list
begin
file l_log, simg
int i, nim,stat
real x,y
bool erase
string first, img, uniq
uniq = mktemp ("_Tsh4")
simg = uniq // ".img"
l_log = mktemp ("tmp$sh4")
# Get positional parameters
first = first_image
nim = frame
if (sky == "" || sky == " " || sky == "null")
imcopy (first, simg, verbose-)
else {
if ((! access(sky)) && (! access(sky//".imh")))
print ("Sky image: ",sky," not found!")
else
imarith (first,"-",sky,simg,pix="real",calc="real",hpar="")
}
if (orient) imcopy(simg//"[*,-*]",simg)
if (zscale) {
display(simg,nim,erase+,zs+,zr-,fill-,ztrans=ztrans)
} else {
display(simg,nim,erase+,zs-,zr-,fill-,ztrans=ztrans,z1=z1,z2=z2)
}
imdelete (simg,verify-,>& "dev$null")
delete (l_log,ver-,>& "dev$null")
imdelete (simg,verify-,>& "dev$null")
end