Rayfiles including spectral and colorimetric information

: To obtain realistic results in lighting simulation software, realistic models of light sources are needed. A near-ﬁeld model of a light source is accurate, and can be obtained by a near-ﬁeld goniophotometer. This type of goniophotometer is conventionally equipped with a V ( λ ) -ﬁlter. However, the advent of new light sources with spatial-or angular color variations necessitates the inclusion of spectral information about the source. We demonstrate a method to include spectral information of a light source in ray tracing. We measured the relative angular variation of the spectrum of an OLED using a spectroradiometer mounted on a near-ﬁeld goniophotometer. Principal component analysis (PCA) is exploited to reduce the amount of data that needs to be stored. Also a photometric ray ﬁle of the OLED was obtained. To construct a set of monochromatic ray ﬁles, the luminous ﬂux in the original ray ﬁle is redistributed over a set of wavelengths and stored in separate ray ﬁles. The redistribution depends on the angle of emission and the spectral irradiance measured in that direction. These ray ﬁles are then inserted in ray tracing software TracePro. Using the OLED as a test source, the absolute spectral irradiance is calculated at an arbitrary position. The result is validated using a spectroradiometer to obtain the absolute spectral irradiance at that particular point. A good agreement between the simulated and measured absolute spectral irradiance is found. Furthermore, a set of tristimulus ray ﬁles is constructed and used in ray tracing software to generate a u (cid:3) v (cid:3) -color coordinate distribution on a


Introduction
Near-field goniophotometry is used to create a near-field representation of a light source [1][2][3][4][5][6][7][8][9].In a near-field goniophotometer (NFG), a luminance camera, also termed imaging luminance measurement device (ILMD), and a photometer revolve around the light source [11].From this data, dedicated software allows the extraction of ray data of the source, which can be used in ray tracing software.After ray tracing, illuminance distributions can be calculated at any distance to the source and a far-field luminous intensity can be calculated.
Often a NFG is only equipped with a V(λ )-filter and no spectral information of the source is measured.Whenever there is negligible color variation across the light source, a luminance camera equipped with a V(λ )-filter yields satisfactory results.However, the advent of white LEDs and OLEDs reveal the limitations of this method: LEDs and OLEDs display angular spectral variations and OLEDs can even display spectral variations across the surface.Clearly, spectral information about the source becomes indispensable whenever accurate predictions of color are important, for example in projectors, automotive [12] and surgical lights [13].
In literature, some practical techniques are reported to combine spectral and near-field goniophotometric measurements [14].Subsequent measurements using tristimulus filters allow for colors to be analyzed, but only few ray tracing software can handle this type of data [15].Instead, most ray tracing software allow for spectral information of the source to be included by assigning a wavelength to each ray.This spectral information is needed to calculate how a ray propagates through an optical system whenever spectrally dependent optical components are present.The challenge is however to obtain such spectral ray files.A near-field hyperspectral goniometric measurement would result in a spectral ray file with high angular and spatial resolution.At present, however, this type of measurement would require extremely long measurements and a vast amount of data should be handled and stored.Also, sufficient signal-to-noise at shorter wavelengths should be guaranteed and their spectral band should be extended down to 400 nm [16].This paper shows that whenever the spectral radiance distribution does not vary across the source, more straightforward techniques allow for spectral ray files to be constructed.

Test source
An OLED exhibiting some angular spectral variations is used as device under test (DUT).The DUT is centrally mounted in a commercially available NFG of type RIGO801 by TechnoTeam in Germany, as in Fig. 1.The DUT is driven at a constant current of 100mA.The stability of the DUT is checked during a stabilization time of 30 minutes, in which a maximum of 0.5% variation was recorded at three consecutive measurements, taken 15 minutes apart.Two types of measurements are sequentially performed in the NFG.First, irradiance spectra are taken at various angles around the DUT, while maintaining a fixed distance of 27 cm to the center of the DUT.Second, the NFG was employed to sample the ray field of the OLED, using both an ILMD and a photometer that revolve around the DUT at a fixed distance of 27 cm.The offset between the positions of the detectors is corrected for by the software.

Methods
This section outlines the method used to construct spectral ray files from measuring spectral irradiance and a ray file of the OLED.To aid the reader to reproduce this procedure, the equations are worked out in detail.To illustrate the procedure, the method is immediately applied to the OLED.

Coordinates and geometry of the OLED
Consider an elementary source element dA s , on the extended light source A s representing the OLED, as in Fig. 2(a).The spectral irradiance at a point P, due to this elementary source, depends on the spectral radiance dL e,λ (r s , α s , β s ) of the elementary source element, where α s is the local polar angle between the direction vector towards P, and the surface normal ns at dA s , and β s is the local azimuthal angle with respect to an arbitrary direction.In far-field conditions, the source can be approximated by a point source, located at the photometric center C, see Fig. 2(b).Within the lighting community, the C − γ coordinate system is traditionally used and The spectral irradiance at a point P, due to this elementary source, will depend on the spectral radiance dL e,λ (r s , α s , β s ) of the elementary source element dA s , (b) The detector at P is oriented towards the photometric center C of the OLED and all coordinates are expressed with respect to C. This is indicated by the overbar on the symbols.
is defined as follows: at the photometric center C, three mutually perpendicular axes can be defined, which are typically denoted first (or principal), second and third axis.Distances can be calculated from this photometric center and angles are specified with respect to the first and second axis.Whenever distances or angles are measured with respect to the photometric center, an overbar will be used to indicate this by notation: βs corresponds to the angle of the C-plane, and ᾱs corresponds to γ.For mathematical simplicity, we will assume that the spectral variation of the beam is rotationally symmetric at each point of the source and thus only depends on the polar angle.Notably, the method could be extended to include cases where this assumption no longer holds.

Spectral irradiance
The average spectral irradiance at the detector is measured for a number of polar angles ᾱs from 0 to 80 • , with an angular step size of 10 • .The term average is used here to indicate that the measured spectrum is originating from a spatially extended source; as opposed to a hyperspectral camera, a spectroradiometer does not allow for spatially resolved spectral measurements.Spectra are taken using a HR4000 spectroradiometer (Ocean Optics).The spectral sensitivity of the spectroradiometer is calibrated using a spectral irradiance standard lamp.Dark current is subtracted from the raw data.To maximize the signal-to-noise ratio of the spectrum at each angle, the integration time is optimized while avoiding saturation.
For each angle ᾱi , there is at least one wavelength at which a maximum spectral irradiance occurs, which will be denoted as E max e,λ ( ᾱi ).Each measured spectral irradiance E e,λ ( ᾱi ) can be normalized to its maximum, where Êe,λ ( ᾱi ) represents the normalized spectral irradiance at the angle ᾱi .In this spectral irradiance, the variation of the angle with respect to the receiver normal is included.Fig. 3 clearly shows that the relative contribution of the blue part of the spectrum increases strongly with viewing angle, resulting in a more bluish appearance at large viewing angles.These variations are due to optical cavities and optical properties of the layers constituting the OLED [17,18].

Photometric ray file
A photometric ray file is a near-field representation of a light source that consists of a set of rays.Each ray is defined by seven parameters: three spatial coordinates representing the starting position on a virtual surface, three vector components defining a direction of propagation and a luminous flux Φ ray .The geometrical surface is located as close as practically achievable to the physical light emitting surface of the source: a rectangular box of 15 cm × 5 cm × 0.5 cm was chosen.For each photometric ray, three components of the unit vector p, describing its direction, can be used to calculate its polar angle α ray with respect to the local unit surface normal vector n: For the OLED, the surface normal is directed along the principal axis across its surface.Although physically, a ray must be considered as a dA s dΩ cos α s element in phase space carrying an infinitesimal flux dΦ [15], a ray file is a discrete representation of the output of a source as a number of separate entities (rays) to which a certain power has been associated.The spectral content of the flux of a ray in a direction ᾱ, denoted by Φ ray e,λ ( ᾱ), is supposed to be proportional to the average spectral irradiance obtained in that direction: with k( ᾱ) the proportionality factor that may depend on the direction of the ray.Adopting this assumption, local spectral non-uniformities of the source are neglected, since the spectral content of a ray becomes only dependent on the polar angle and not on the starting position.In order to apply Eq. ( 3) for any ray characterized by a particular polar angle, the spectral irradiance has to be known at that particular angle, although the normalized irradiance is only determined at 8 orientations.To solve this problem, two strategies can be identified.The first method is a simple linear interpolation between the measured irradiance functions.formed for each corresponding wavelength.In this paper, a different approach using principal component analysis is exploited.

Principal Component Analysis (PCA)
Since the light source spectra, measured at a series of viewing angles, are different manifestations of the same physical phenomena taking place in the source, it can be assumed the spectra are correlated.This relationship can allow for a significant reduction in spectral data when modelling the spectral quantities of the light source.A typical statistical technique for finding such relationships in a series of spectra is PCA [10,19].The basis functions that result from the PCA analysis are orthogonal, as they are equivalent to finding eigenvectors of a matrix.Using these basis functions allows for large datasets to be represented by an alternative dataset that is smaller, but can be used to approximate the original dataset with a given error.The first basis function results in the highest variance reduction in the data.Including more basis functions results in ever smaller errors between the measured spectra and the reduced spectra.Applying PCA on the normalized spectral irradiances, allows a set of base functions { f j (λ )} and coefficients c j ( ᾱi ) to be calculated, so that: Notably, the weights c will only depend on the angle ᾱi , while the base functions { f j (λ )} only depend on wavelength λ .For a ray in any intermediate angle ᾱ, this relationship holds but now the values of the weight factors c j ( ᾱ) must be calculated by interpolation of the c j ( ᾱi ) relationship.Figs.4(a)-(c) display the original and PCA reconstructed spectral irradiances (upper panel and middle panel respectively) and the relative error between both with respect to the original spectral irradiance (lower panel.)These relative errors are determined using two, three and four base functions.When using four base functions, Fig. 4 shows an error smaller than 1% is reached for each wavelength.When using only three base functions, an error of less than 2% was obtained, while using only two base functions resulted in an error of 3.4%.A threshold of 1% is adopted in this paper, so further analysis is performed using four basis functions.

Constructing a spectral ray file
The luminous flux of a ray Φ ray ( ᾱ) in a particular direction ᾱ can be written as Inserting Eq. (3) into Eq.( 5), one finds From Eq. ( 6) an expression for the scale factor k( ᾱ) can be calculated: Inserting Eq. ( 7) into Eq.( 3) allows the calculation of the spectral radiant flux associated with a ray in a direction ᾱ, for a given wavelength, Since Êe,λ ( ᾱ) in Eq. ( 8) can be determined by direct interpolation or by interpolation of the PCA weights c j , the spectral radiant flux of each ray at each particular wavelength can be calculated.This allows for example for a set of 81 monochromatic ray files to be generated, ranging from 380 nm to 780 nm in steps of 5 nm.

Results and discussion
Using the method outlined before, a set of 81 monochromatic ray files is constructed and inserted into ray tracing software TracePro.After subsequent ray tracing of each ray file, the absolute spectral irradiance is evaluated at an arbitrary point, and a u v -color distribution is simulated on a task area below the OLED.Also tristimulus ray files can be constructed and inserted.This allows for a fast way to study color variations across a task area.

Absolute spectral irradiance at a point
To simulate the spectral irradiance at an arbitrary point, the 81 monochromatic ray files are inserted consecutively into ray tracing software.A point P located 50 cm along the optical axis is chosen, while orienting this detector towards the photometric center of the OLED.The Fig. 5.The absolute spectral irradiance at P is measured using a spectroradiometer (full black line) and compared to simulations using spectral ray tracing (dots).These results agree well, a mean error of 0.01 mW m −2 nm −1 is obtained.
calculations are validated by performing a measurement of the absolute spectral irradiance using a mobile spectroradiometer equipped with an irradiance detector head and located at the corresponding position.In Fig. 5, the agreement between the measured spectrum (full black line) and simulated spectrum (dots) at P, suggest the validity of this method.A mean error of only 0.01 mW m −2 nm −1 proves that real spectral ray files can be generated from a photometric ray file combined with a limited set of spectral data.
Of course, the amount of ray-data scales up with the number of wavelengths that are used for ray tracing.Based on the PCA method, an alternative structure for a ray file could be suggested: to each line of the current format of the ray file, the coefficients c j ( ᾱ) can be stored.This ray file format could in the future be included in a technical report on ray file formats, as TM-25-13 [20].The number of additional columns j equals the number of base spectra that are used.Also the base functions should be stored separately.To illustrate the amount memory capacity needed, consider a ray file having M rays.Using 81 wavelengths and direct interpolation, 81 × 7 × M = 567 × M numbers should be stored, where 7 is the amount of numbers stored in each row of the ray file.The PCA method uses the original ray file but adds four coefficients and four base functions sampled at 81 wavelengths.The numbers to be stored are (7 + 4) × M + (4 × 81) = 11 × M + 324 numbers.Whenever the number of rays is high compared to the numbers of wavelengths, a reduction factor of (567 − 11)/567 = 98% is achieved.

Tristimulus ray files
If the spectral irradiance can be calculated at any point in space around the light source, it is also possible to calculate the tristimulus values and the color coordinates at each observation point, where x, ȳ and z are the color matching functions.The color coordinates at a plane of 2m × 2m, parallel to and 0.5 m below the OLED have been calculated after tracing the spectral ray files.(Fig. 6) The color variations show a shift towards blue away from the center of this plane, as can be expected from the relative average spectra.Maximal color differences Δu v over this detection area amounts to 0.080 which is clearly beyond the perceptible threshold (0.004).
If only colorimetric information is required, a full wavelength by wavelength simulation using each of the 81 spectral ray files can be avoided.Indeed, from the full spectral flux information, the tristimulus values can be calculated for each ray: In this way, an X ray file can be constructed where the luminous flux of the ray is replaced by the X value calculated in Eq. (10).In an analogous way, Y and Z ray files can be constructed.Notably, the original ray file can also be called the Y ray file.Assuming no materials that change the spectral content of the rays are present between the source and detector, simulations can be run using each of these three ray files consecutively.The resulting illumination plot in a chosen reference plane using each ray file results in an X, Y and Z-distribution, with the Y distribution corresponding to the ordinary illuminance distribution.Since X, Y and Z are additive, this procedure is fully acceptable.With only three simulations, a complete colorimetric description in any task area can be generated.
At the task area described before, this procedure results in a similar u v -chromaticity distribution as found from the spectral ray files, as in Fig. 7.As only three ray files are needed to calculate the color distribution, as opposed to 81 to calculate the absolute spectral irradiance, the simulation time needed to trace the rays and calculate color variation across a task area is greatly reduced.

Conclusions
The inclusion of spectral information of light sources and luminaires in ray tracing software can offer added value, in particular when the light source displays angular or spatial spectral variation or when wavelength dependent optics and materials are simulated.Using a photometric ray file and a set of averaged spectra, obtained at various viewing angles from a DUT, it was possible to create a set of spectral ray files that can be inserted in ray tracing software.
To reduce the amount of data needed to store the spectra, principal component analysis was used.The method was illustrated using an OLED, which displays an angular variation of its spectral radiance.Using only four base functions, the raw measurements of the spectral irradiance at each angle could be reconstructed with a percentage error below 1%, while reducing the amount of data significantly (up to 98% data-reduction.)Combining these spectra with a photometric ray file, allowed us to construct a set of monochromatic ray files.These were imported in ray tracing software TracePro.At an arbitrary point, the absolute spectral irradiance was simulated.This value matched to a measurement with a spectroradiometer at the corresponding position.Also, by simulating the u v -color coordinates on a task area below the OLED, the color variation due to the OLED was found to be beyond the perceptibility limit.Furthermore, a more time-efficient method to predict color variations across a task area was illustrated: three colorimetric ray files (X, Y and Z) were created from the spectral ray files and inserted into ray tracing software.Assuming that only spectrally neutral materials are introduced between the source and the detection area, the u v -chromaticity distribution could again be calculated on a task area, but using only three instead of 81 ray tracing procedures, which is far more time efficient.

Fig. 1 .
Fig. 1.An OLED is used as device under test.It is mounted in a near-field goniophotometer equipped with an additional spectrometer to measure the angular dependency of the spectral irradiance.

#Fig. 2 .
Fig. 2. (a)The spectral irradiance at a point P, due to this elementary source, will depend on the spectral radiance dL e,λ (r s , α s , β s ) of the elementary source element dA s , (b) The detector at P is oriented towards the photometric center C of the OLED and all coordinates are expressed with respect to C. This is indicated by the overbar on the symbols.

Fig. 4 .
Fig. 4. (a) Measured spectral irradiances.(b) Applying PCA analysis to the measured set of spectral irradiances obtained for the OLED, a new set of spectral irradiances can be constructed.The resolution of these spectra is 5nm, which was taken as the resolution of the basis functions.(c) Using four base functions, the percentage error between the original spectral irradiances and the reconstructed ones, is less than 1%.

#Fig. 6 .
Fig. 6.(a) u and (b) v color coordinates on a task plane of 2m × 2m lying 50 cm below the OLED after tracing the 81 spectral ray files.(c) The black line in the u v -diagram displays these coordinates for the OLED.The color difference Δu v = 0.080 0.004, indicating it is clearly perceptible.

#Fig. 7 .
Fig. 7. (a) u and (b) v color coordinates using only three colorimetric ray files.(c) Similar u v -color coordinates are calculated on a task plane as in Fig. 6.