When converting from XYZ (CIE 1931 color space) to L*a*b* (CIELAB) the formulas, that you'll find e.g. here https://en.wikipedia.org/wiki/CIELAB_color_space, specify you should divide by the XYZ values of the white point of the "reference illuminant" (of the lamp that illuminates the scene?).
My XYZ coordinate comes from an emissive source, so there's no illuminant of the scene. So I can understand this for when an illuminant is involved, because then the sum/integral for producing the XYZ values contains the illuminant. But I just can't find any other formulas than these ones, they all assume an illuminant.
The reference illuminant is not the lamp that illuminates the scene. The reference illuminant is basically just the definition of white. While "pure black" is an unambiguous color (no intensity), "pure white" is not. E.g. if you look at the chromaticity diagram, there are infinitely many points near the middle you could call "white." Therefore, you have to pick one to be "white", and then you can construct the CIELAB space around that. That is, CIELAB is not a completely defined color space until you define what "white" you want to use. Different choices of "white" will give you different CIELAB coordinates. (Of course, as long as you keep track of the white point, the color can still be unambiguously converted back to XYZ.)
A very common definition of "white" is "Illuminant D65," or "statistically ideal European noontime sun," which has tristumulus coordinates (taken from the Wikipedia link) X = 95.047, Y = 100.00, Z = 108.883
for the standard 2º observer. Also according to Wikipedia, CIELAB is often implicitly understood to use Illuminant D50 as its white point. Turning the given xy coordinates back into XYZ coordinates (fixing Y = 100), I get X = 96.421, Y = 100, Z = 82.519
. Pick either one, or even something else, to define your color space. If you're going to output a file or something with data in this color space, you should look into things like "embedded color profiles" for the relevant format, where you can store your choice of "white" for future programs to consume. If that's not possible, you should still document it somehow if it's going to be "user-facing."