psychopy icon indicating copy to clipboard operation
psychopy copied to clipboard

Adding backgroundColorOffset to GratingStim

Open hovavalon opened this issue 2 years ago • 4 comments

Hello, I am trying to convert some matlab PsychoToolbox-3.0 code to PsychoPy. In my matlab code I am using the function CreateProceduralGabor, with the parameter backgroundColorOffset, used to add a constant shift to the color of the texture. I tried to replace the call using the GratingStim, but unfortunately it doesn't have yet a similar option. I saw that there is an unused variable called rgbPedestal, was it intended for this use?

I would happily add this feature myself, are there any guidelines I should follow? Thanks!

hovavalon avatar Feb 22 '23 08:02 hovavalon

If you can see how to implement this variable the by all means feel free to pop in a pull request, we're always happy to see contributions! You can find guides for developers contributing to PsychoPy here: https://www.psychopy.org/developers/index.html

TEParsons avatar Mar 15 '23 13:03 TEParsons

Hi @hovavalon just circling back this. For info, yes, rgbPedestal did do exactly that. Possibly that feature got lost in the refactoring of the color spaces into a color class object if that attribute isn't currently working(?). It does need applying separately to the color. Did you make any progress looking into it?

peircej avatar Jun 26 '23 09:06 peircej

Hi @peircej , I did look into it a little bit, but unfortunately I had no time to write a PR. In case I ever get to it, do you have any recommendations about the general structure of such a PR? Thanks!

hovavalon avatar Jun 27 '23 06:06 hovavalon

There's details on good practice for PR's in the CONTRIBUTING.md document :) https://github.com/psychopy/psychopy/blob/dev/CONTRIBUTING.md

TEParsons avatar Jul 21 '23 14:07 TEParsons