gammaGrid from existing luminance measures

Hi all,

I have some luminance measurements (with either all guns, or R, G, B separately varying between 0 and 255) and would like to create a gammaGrid (or maybe even want to manually set the LUT). But it’s not clear to me how I could determine the gammaGrid value from my measurements. It would also help to know how they’d get used to determine RGB / color values given some input, so I could reverse engineer it. I did not find anything in the documentation or here that could help me.

Pointers welcome!