--- ray/src/px/pacuity.csh 2005/02/16 05:40:11 3.5 +++ ray/src/px/pacuity.csh 2008/11/10 19:08:19 3.6 @@ -1,15 +1,15 @@ #!/bin/csh -f -# RCSid: $Id: pacuity.csh,v 3.5 2005/02/16 05:40:11 greg Exp $ +# RCSid: $Id: pacuity.csh,v 3.6 2008/11/10 19:08:19 greg Exp $ # # Adjust picture acuity according to human visual abilities # if ($#argv != 1) then - echo "Usage: $0 input.pic > output.pic" + echo "Usage: $0 input.hdr > output.hdr" exit 1 endif set td=/tmp set tfc1=$td/ac$$.cal -set tf=($td/c{1,2,4,8,16,32}d$$.pic $tfc1) +set tf=($td/c{1,2,4,8,16,32}d$$.hdr $tfc1) set ifile=$1 onintr quit tabfunc -i acuity > $tfc1 << EOF @@ -40,7 +40,7 @@ set vp=`vwright V < $ifile` set aext=(`pextrem -o $ifile | rcalc -f $tfc1 -e 'max(a,b):if(a-b,a,b);$1=acuity(log10(max(179*(.265*$3+.67*$4+.065*$5),1e-4)))'`) ( rcalc -e "$vp" -e "A:3438*sqrt(Vhn/$pres[1]*Vvn/$pres[2])" \ -e 'f=60/A/2/$1;cond=if(1.5-$1,1,if(1-f,-1,if($1-'"$aext[2]"',-1,$1-'"$aext[1])))" \ - -o 'pfilt -1 -r 2 -x /${f} -y /${f} '"$ifile | pfilt -1 -r 1 -x $pres[1] -y $pres[2] > $td/"'c${$1}d'$$.pic \ + -o 'pfilt -1 -r 2 -x /${f} -y /${f} '"$ifile | pfilt -1 -r 1 -x $pres[1] -y $pres[2] > $td/"'c${$1}d'$$.hdr \ | csh -f ) << EOF 1 2 @@ -63,10 +63,10 @@ go = clarity*gi(clear_picture) + (1-clarity)*gi(fuzzy_ bo = clarity*bi(clear_picture) + (1-clarity)*bi(fuzzy_picture); picture_acuity(n) : select(n,1, _EOF_ -set pf=($td/c1d$$.pic) +set pf=($td/c1d$$.hdr) foreach i (2 4 8 16 32) - if ( -f $td/c${i}d$$.pic ) then - set pf=( $pf $td/c${i}d$$.pic ) + if ( -f $td/c${i}d$$.hdr ) then + set pf=( $pf $td/c${i}d$$.hdr ) echo -n "$i," >> $tfc1 endif end