Entering values manually for colour calibration

Hi! I’m trying to enter an LMS->RGB matrix into a new monitor definition.

OS MacOS 10.13.6
PsychoPy version 2022.2.5 and also 2024.2.4
**Standard Standalone? y
What are you trying to achieve?:
Manually enter values into the LMS->RGB matrix in the monitor centre. I have an oceanoptics device which I can use to create those matrices. When I start typing numbers into each box I get an error:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/monitors/MonitorCenter.py”, line 777, in onChangeLMSgrid
KeyError: ‘lms_rgb’

What did you try to make it work?:
Tab not enter on each box. In fact the numbers ‘stick’ in the box if I carry on but are not saved when I save the monitor. I thought I might have to add in a gamma calibration first but that does not seem to help.

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

In addition: I would be happy to edit a JSON monitor file with the LMS2RGB matrix in it if you could provide a sample…
thanks!
Alex

Just to follow up here : in MonitorCenter.py onChangeDKLgrid ther is a line that sets self.currentMon,currentCalib[‘dkl_rgb’][row,col] = newVal
I’m just wondering if this should be self.currentMon,currentCalib[‘dkl_rgb’][row][col] = newVal
?