5 |
|
# |
6 |
|
# Added user-definable legend 2004/01/20 Rob Guglielmetti |
7 |
|
|
8 |
– |
set td=/tmp/fc$$ |
8 |
|
onintr quit |
9 |
+ |
set td=`mktemp -d /tmp/fc.XXXXXX` |
10 |
|
set mult=179 |
11 |
|
set label=Nits |
12 |
|
set scale=1000 |
13 |
|
set decades=0 |
14 |
– |
# set redv='1.6*v-.6' |
15 |
– |
# set grnv='if(v-.375,1.6-1.6*v,8/3*v)' |
16 |
– |
# set bluv='1-8/3*v' |
14 |
|
set redv='def_red(v)' |
15 |
|
set grnv='def_grn(v)' |
16 |
|
set bluv='def_blu(v)' |
37 |
|
case -s: |
38 |
|
shift argv |
39 |
|
set scale="$argv[1]" |
40 |
+ |
if ("$scale" =~ [aA]*) set needfile |
41 |
|
breaksw |
42 |
|
case -l: |
43 |
|
shift argv |
59 |
|
shift argv |
60 |
|
set bluv="$argv[1]" |
61 |
|
breaksw |
62 |
+ |
case -spec: |
63 |
+ |
set redv='1.6*v-.6' |
64 |
+ |
set grnv='if(v-.375,1.6-1.6*v,8/3*v)' |
65 |
+ |
set bluv='1-8/3*v' |
66 |
+ |
breaksw |
67 |
|
case -i: |
68 |
|
shift argv |
69 |
|
set picture="$argv[1]" |
100 |
|
endsw |
101 |
|
shift argv |
102 |
|
end |
103 |
< |
mkdir $td |
103 |
> |
if ($?needfile && "$picture" == '-') then |
104 |
> |
cat > $td/picture |
105 |
> |
set picture=$td/picture |
106 |
> |
endif |
107 |
> |
if ("$scale" =~ [aA]*) then |
108 |
> |
set LogLmax=`phisto $picture | tail -2 | sed -n '1s/ [0-9]*$//p'` |
109 |
> |
set scale=`ev "$mult/179*10^$LogLmax"` |
110 |
> |
endif |
111 |
|
cat > $td/pc0.cal <<_EOF_ |
112 |
|
PI : 3.14159265358979323846 ; |
113 |
|
scale : $scale ; |
181 |
|
set pc1args=($pc1args -e 'ra=0;ga=0;ba=0') |
182 |
|
else if ("$cpict" == "$picture") then |
183 |
|
set cpict= |
174 |
– |
endif |
175 |
– |
if ($?needfile && "$picture" == '-') then |
176 |
– |
cat > $td/picture |
177 |
– |
set picture=$td/picture |
184 |
|
endif |
185 |
|
if ("$decades" != "0") then |
186 |
|
set pc1args=($pc1args -e "map(x)=if(x-10^-$decades,log10(x)/$decades+1,0)") |