ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/conv1.cal
Revision: 1.1
Committed: Sat Feb 22 02:07:21 2003 UTC (21 years, 2 months ago) by greg
Branch: MAIN
CVS Tags: rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# User Rev Content
1 greg 1.1 {
2     Rcalc run to convolve light source SPD with standard curves.
3     Used by scripts illumcal, reflcal.
4    
5     Input is wavelength (in nanometers) and output (in watts/nm/something).
6     Variable "intvl" must be set to value spacing (in nm).
7     Output is per-wavelength convolution as described below.
8     }
9     cond = if($1-359,831-$1,-1); { 360-830 nm range }
10     $1 = $2*intvl*photopic($1); { photopic impulse }
11     $2 = $2*intvl*scotopic($1); { scotopic impulse }
12     $3 = $2*tx; { source X }
13     $4 = $2*ty; { source Y }
14     $5 = $2*tz; { source Z }
15     $6 = $2*trix10($1); { source X10 }
16     $7 = $2*triy10($1); { source Y10 }
17     $8 = $2*triz10($1); { source Z10 }
18     $9 = $2*tx*r1v; { CIE reference color 1 X }
19     $10 = $2*ty*r1v; { CIE reference color 1 Y }
20     $11 = $2*tz*r1v; { CIE reference color 1 Z }
21     $12 = $2*tx*r2v; { CIE reference color 2 X }
22     $13 = $2*ty*r2v; { CIE reference color 2 Y }
23     $14 = $2*tz*r2v; { CIE reference color 2 Z }
24     $15 = $2*tx*r3v; { CIE reference color 3 X }
25     $16 = $2*ty*r3v; { CIE reference color 3 Y }
26     $17 = $2*tz*r3v; { CIE reference color 3 Z }
27     $18 = $2*tx*r4v; { CIE reference color 4 X }
28     $19 = $2*ty*r4v; { CIE reference color 4 Y }
29     $20 = $2*tz*r4v; { CIE reference color 4 Z }
30     $21 = $2*tx*r5v; { CIE reference color 5 X }
31     $22 = $2*ty*r5v; { CIE reference color 5 Y }
32     $23 = $2*tz*r5v; { CIE reference color 5 Z }
33     $24 = $2*tx*r6v; { CIE reference color 6 X }
34     $25 = $2*ty*r6v; { CIE reference color 6 Y }
35     $26 = $2*tz*r6v; { CIE reference color 6 Z }
36     $27 = $2*tx*r7v; { CIE reference color 7 X }
37     $28 = $2*ty*r7v; { CIE reference color 7 Y }
38     $29 = $2*tz*r7v; { CIE reference color 7 Z }
39     $30 = $2*tx*r8v; { CIE reference color 8 X }
40     $31 = $2*ty*r8v; { CIE reference color 8 Y }
41     $32 = $2*tz*r8v; { CIE reference color 8 Z }
42     tx=trix($1); ty=triy($1); tz=triz($1);
43     r1v=rho1($1); r2v=rho2($1); r3v=rho3($1); r4v=rho4($1);
44     r5v=rho5($1); r6v=rho6($1); r7v=rho7($1); r8v=rho8($1);
45     abs(x) : if(x,x,-x);