-
Notifications
You must be signed in to change notification settings - Fork 1
/
pccd.cl
executable file
·72 lines (45 loc) · 1.48 KB
/
pccd.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
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# Ver. Jun03
#
procedure pccd (filename)
string filename {prompt="input file (.dat)"}
int nstars {prompt="number of stars (maximum 2000)"}
int nhw {prompt="number of postions of wave-plate (maximum 16)"}
int nap {prompt="number of apertures (maximum 10)"}
string calc {enum="c|p", prompt="analyser: calcite (c) / polaroid (p)"}
real readnoise {prompt="CCD readnoise (adu)"}
real ganho {prompt="CCD gain (e/adu)"}
real deltatheta {prompt="correction in polarization angle (degrees)"}
string fileout {prompt="output file (.log)"}
string fileexe {prompt="pccd execute file (.exe)"}
begin
string file1, file2, roda, tmp, file11, file_name, dum
tmp = envget("tmp")
file_name = filename
copy(file_name,tmp,ver-)
cd tmp
file1 = "entrada"
if (access(file1)) delete(file1, ver-)
print ("'", file_name, "'", >> file1)
print (nstars, >> file1)
print (nhw, >> file1)
print (nap, >> file1)
print (calc, >> file1)
print (readnoise, >> file1)
print (ganho, >> file1)
print (deltatheta, >> file1)
file2 = "roda"
if (access(file2)) delete(file2,ver-)
if (access(fileout)) delete(fileout,ver-)
print (fileexe, " <", file1, " >&", fileout, >> file2)
!source roda
delete(file1, ver-)
delete(file2, ver-)
delete(file_name, ver-)
dum = mktemp("tmp$dum")
back > dum//""
delete(dum,ver-)
if (access(fileout)) delete(fileout)
copy(tmp//fileout,".")
delete(tmp//fileout,ver-)
end