ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/conv1.cal
Revision: 1.2
Committed: Wed Nov 21 18:10:45 2018 UTC (5 years, 5 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Changes since 1.1: +1 -0 lines
Error occurred while calculating annotation data.
Log Message:
Added missing RCSid tag

File Contents

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