ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/dayfact.csh
(Generate patch)

Comparing ray/src/util/dayfact.csh (file contents):
Revision 2.2 by greg, Thu Nov 28 11:49:12 1991 UTC vs.
Revision 2.7 by greg, Thu Oct 6 05:49:44 2005 UTC

# Line 1 | Line 1
1   #!/bin/csh -f
2 < # SCCSid "$SunId$ LBL"
2 > # RCSid: $Id$
3   #
4   # Interactive script to calculate daylight factors
5   #
# Line 28 | Line 28 | a contour plot from the result.  The input is a Radian
28   (and octree) and the output is one or more color Radiance pictures.
29  
30   _EOF_
31 < echo -n "Have you already calculated an illuminance picture with dayfact? "
32 < if ( "$<" =~ [yY]* ) then
33 <        readvar illumpic
31 > echo "Have you already calculated an illuminance picture using dayfact?"
32 > readvar illumpic
33 > if ( $illumpic != $nofile ) then
34          if ( ! -r $illumpic ) then
35                  echo "Cannot read $illumpic"
36                  exit 1
# Line 74 | Line 74 | if ( $genskyf == $nofile ) then
74          echo "You will not be able to compute daylight factors"
75          echo "or energy savings since there is no gensky file."
76   else
77 <        xform -e $genskyf > /usr/tmp/gsf$$
78 <        grep '^# gensky ' /usr/tmp/gsf$$
77 >        xform -e $genskyf > /tmp/gsf$$
78 >        grep '^# gensky ' /tmp/gsf$$
79          if ( $status ) then
80                  echo "The file $genskyf does not contain a gensky command\!"
81 <                rm -f /usr/tmp/gsf$$
81 >                rm -f /tmp/gsf$$
82                  goto getgenskyf
83          endif
84 <        set title=$title\ `sed -n 's/^# gensky  *\([0-9][0-9]*  *[0-9][0-9]*  *[0-9][0-9.]*\).*$/\1/p' /usr/tmp/gsf$$`
85 <        set extamb=`sed -n 's/^# Ground ambient level: //p' /usr/tmp/gsf$$`
86 <        grep -s '^# gensky .* -c' /usr/tmp/gsf$$
84 >        set title=$title\ `sed -n 's/^# gensky  *\([0-9][0-9]*  *[0-9][0-9]*  *[0-9][0-9.]*\).*$/\1/p' /tmp/gsf$$`
85 >        set extamb=`sed -n 's/^# Ground ambient level: //p' /tmp/gsf$$`
86 >        grep -s '^# gensky .* -c' /tmp/gsf$$
87          set nodaysav=$status
88 <        rm -f /usr/tmp/gsf$$
88 >        rm -f /tmp/gsf$$
89          if ( $nodaysav ) then
90                  echo "The gensky command was not done for an overcast sky"
91                  echo "(-c option), so energy savings cannot be calculated."
# Line 115 | Line 115 | if ( $ilpict == $nofile && $dfpict == $nofile && $dspi
115   endif
116   echo "Title for output picture"
117   readvar title
118 < set sctemp=/usr/tmp/sc$$.csh
118 > set sctemp=/tmp/sc$$.csh
119   cat <<'_EOF_' > $sctemp
120   if ( $illumpic != $nofile ) then
121          set iltemp=""
122   else
123 <        set iltemp=/usr/tmp/il$$.pic
123 >        set iltemp=/tmp/il$$.pic
124          set illumpic=$iltemp
125   endif
126 < set tltemp=/usr/tmp/tl$$.pic
127 < set dstemp=/usr/tmp/ds$$.pic
128 < set temp1=/usr/tmp/tfa$$
126 > set tltemp=/tmp/tl$$.pic
127 > set dstemp=/tmp/ds$$.pic
128 > set temp1=/tmp/tfa$$
129   set tempfiles=($iltemp $sctemp $tltemp $dstemp $temp1)
130   echo "Your dayfact job is finished."
131   echo "Please check for error messages below."
# Line 136 | Line 136 | if ( ! $?gotillumpic ) then
136          | rcalc -e '$1=($2+.5)/'"$wpres[1]*$wpsize[1]+$wporig[1]" \
137                  -e '$2=(1-($1+.5)/'"$wpres[2])*$wpsize[2]+$wporig[2]" \
138                  -e '$3='"$wporig[3]" -e '$4=0;$5=0;$6=1' \
139 <        | rtrace $rtargs -h+ -I+ -ov -faf $octree \
140 <        | pvalue -r -y $wpres[2] +x $wpres[1] -df > $temp1
139 >        | rtrace $rtargs -h+ -I+ -ov -fac -x $wpres[1] -y $wpres[2] $octree \
140 >        > $temp1
141          pfilt -h 20 -n 0 -x 300 -y 300 -p 1 -r 1 $temp1 > $illumpic
142   endif
143   set maxval=`getinfo < $illumpic | rcalc -i 'EXPOSURE=${e}' -e '$1=3/e'`
144 + if ("$maxval" == "") set maxval=3
145   psign -h 42 " $title " | pfilt -1 -x /2 -y /2 > $tltemp
146   '_EOF_'
147   if ( $ilpict != $nofile ) then
# Line 149 | Line 150 | if ( $ilpict != $nofile ) then
150                  | pcompos -a 1 - $tltemp > $ilpict' >> $sctemp
151   endif
152   if ( $dfpict != $nofile ) then
153 <        echo 'falsecolor -cb -l DF -s 50 \\
153 >        echo 'falsecolor -cb -l DF -s 16 \\
154                  $fcopts -m "100/PI/$extamb" -ip $illumpic \\
155                  | pcompos -a 1 - $tltemp > $dfpict' >> $sctemp
156   endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines