The MATLab data file has 3 arrays
- Input vector - aka, the light source (In Cartesian coordinates)
- Output vector - aka, the eye (Also in Cartesian coordinates)
- Spectral data (spectral data is discretized into 31 bins)
So input[n], with output[n] results in spectral[n]
The ASTM file is a flattened version of the MATLab data file, with one major difference: the input and output vectors are in spherical coordinates, specifically the traditional physics notation:

The data is defined in the following range:
For input vector, $\theta$ (theta) varies from $0$ to $\frac{\pi}{2}$, and $\phi$ (phi) is always a constant $0$.
The output vectors are uniformally distributed across the hemisphere. Since $\phi$ is periodic on $2\pi$, mathematically you can define the bounds of $\phi$ in an infinite number of ways. In this data set they chose:
$$\phi = [-\pi, \pi]$$
but it would be perfectly fine to choose
$$\phi = [0, 2\pi]$$
Now, in order to use the data:
- Since the input vectors only vary over a quarter circle ($\theta = [0, \frac{\pi}{2}]$ and $\phi = 0$), not the whole hemisphere, you will need to find the matrix transform that transforms your input vector to the quarter circle.
- Apply the same transform to the output vector.
- Using the transformed input and output vectors, look up the spectral response of the BRDF.
- I'm not sure of the best way to do this. I defer to others' opinions. I'm sure there is some kind of data structure / algorithm to do the search.
- The naive way would be to do a O(n) search of all the input and output directions to find the two or three that are closest, then LERP between them.
- Use the spectral values as the BRDF in the rendering equation