1 |
< |
#!/bin/csh -f |
2 |
< |
# SCCSid "$SunId$ LBL" |
1 |
> |
#!/bin/csh -fe |
2 |
> |
# RCSid: $Id$ |
3 |
|
# |
4 |
|
# Create false color image with legend |
5 |
|
# |
6 |
+ |
# Added user-definable legend 2004/01/20 Rob Guglielmetti |
7 |
+ |
|
8 |
|
set td=/usr/tmp/fc$$ |
9 |
|
onintr quit |
10 |
|
set mult=179 |
22 |
|
set legheight=200 |
23 |
|
while ($#argv > 0) |
24 |
|
switch ($argv[1]) |
25 |
+ |
case -lw: |
26 |
+ |
shift argv |
27 |
+ |
set legwidth="$argv[1]" |
28 |
+ |
breaksw |
29 |
+ |
case -lh: |
30 |
+ |
shift argv |
31 |
+ |
set legheight="$argv[1]" |
32 |
+ |
breaksw |
33 |
|
case -m: |
34 |
|
shift argv |
35 |
|
set mult="$argv[1]" |
158 |
|
else |
159 |
|
set imap="imap(y)=y" |
160 |
|
endif |
161 |
+ |
if ( $legwidth > 20 && $legheight > 40 ) then |
162 |
|
pcomb $pc0args -e 'v=(y+.5)/yres;vleft=v;vright=v' \ |
163 |
|
-e 'vbelow=(y-.5)/yres;vabove=(y+1.5)/yres' \ |
164 |
|
-x $legwidth -y $legheight > $td/scol.pic |
167 |
|
-e "$imap" | sed -e 's/\(\.[0-9][0-9][0-9]\)[0-9]*/\1/' ) \ |
168 |
|
| psign -s -.15 -cf 1 1 1 -cb 0 0 0 \ |
169 |
|
-h `ev "floor($legheight/$ndivs+.5)"` > $td/slab.pic |
170 |
+ |
else |
171 |
+ |
set legwidth=0 |
172 |
+ |
set legheight=0 |
173 |
+ |
(echo "" ; echo "-Y 1 +X 1" ; echo "aaa" ) > $td/scol.pic |
174 |
+ |
cp $td/scol.pic $td/slab.pic |
175 |
+ |
endif |
176 |
|
if ( $?doextrem ) then |
177 |
|
pextrem -o $picture > $td/extrema |
178 |
|
set minpos=`sed 2d $td/extrema | rcalc -e '$2=$2;$1=$1+'"$legwidth"` |