Code for working with measured BRDF data