Hello team,
I apologize for the trivial question but I cannot find a definitive answer otherwise. I am trying to understand how to use gamma correction in the context of having constant luminance when I shift from a black and white gratings stimuli to a grey background and back for a visual experiment. The idea is to ensure a linear gradient and constant total luminance when shifting between the gratings and grey background.
I have coded the paradigm already but I am not sure how to apply gamma correction with the available function options in PTB.
Note if you want more precise correction, you need to measure the exact gamma curve with a light meter. You can then fit a curve more precisely to the data, and then test that the result is fully linear with the same light meter. If you have access to a SpectroCal / ColorCal / i1Pro then I have a class to automate this here: