ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/falsecolor.pl
(Generate patch)

Comparing ray/src/px/falsecolor.pl (file contents):
Revision 2.7 by greg, Fri Mar 30 16:44:18 2012 UTC vs.
Revision 2.10 by greg, Tue Apr 15 21:34:31 2014 UTC

# Line 6 | Line 6 | use strict;
6   use File::Temp qw/ tempdir /;
7   use POSIX qw/ floor /;
8  
9 < my @palettes = ('def', 'spec', 'pm3d', 'hot');
9 > my @palettes = ('def', 'spec', 'pm3d', 'hot', 'eco');
10  
11   my $mult = 179.0;              # Multiplier. Default W/sr/m2 -> cd/m2
12   my $label = 'cd/m2';           # Units shown in legend
# Line 37 | Line 37 | while ($#ARGV >= 0) {
37          $legheight = shift;
38      } elsif (m/-m/) {          # Multiplier
39          $mult = shift;
40 +    } elsif (m/-spec/) {
41 +        die("depricated option '-spec'. Please use '-pal spec' instead.");
42      } elsif (m/-s/) {          # Scale
43          $scale = shift;
44          if ($scale =~ m/[aA].*/) {
# Line 150 | Line 152 | hot_red(x) = clip(3*x) ^ gamma;
152   hot_grn(x) = clip(3*x - 1) ^ gamma;
153   hot_blu(x) = clip(3*x - 2) ^ gamma;
154  
155 + eco_red(x) = clip(2*x) ^ gamma;
156 + eco_grn(x) = clip(2*(x-0.5)) ^ gamma;
157 + eco_blu(x) = clip(2*(0.5-x)) ^ gamma;
158 +
159   interp_arr2(i,x,f):(i+1-x)*f(i)+(x-i)*f(i+1);
160   interp_arr(x,f):if(x-1,if(f(0)-x,interp_arr2(floor(x),x,f),f(f(0))),f(1));
161  
# Line 277 | Line 283 | if (($legwidth > 20) && ($legheight > 40)) {
283          $value =~ s/(\.[0-9]{3})[0-9]*/$1/;
284          $text .= "\n$value";
285      }
286 <    system "psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $sheight $text > $slabpic";
286 >    open PSIGN, "| psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $sheight > $slabpic";
287 >    print PSIGN "$text\n";
288 >    close PSIGN;
289  
290      # Legend: Create the background colours
291      $cmd = qq[pcomb $pc0args];
# Line 309 | Line 317 | system $cmd;
317   my $loff1 = $loff - 1;
318  
319   # Command line without extrema
320 < $cmd = qq[pcomb $pc0args $pc1args $picture $cpict];
320 > $cmd = qq[pcomb $pc0args $pc1args "$picture"];
321 > $cmd .= qq[ "$cpict"] if ($cpict);
322   $cmd .= qq[ | pcompos $scolpic 0 0 +t .1 $slabinvpic 2 $loff1];
323   $cmd .= qq[ -t .5 $slabpic 0 $loff - $legwidth 0];
324  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines