I am using python since may 2018 and I’m learning to use psychopy. I try to create a dot that should be red but, when I set the color to red, the dot is displaying in blue. When I set it to black, the dot is displaying in white. I tried to change the opacity of my fixmark but it isn’t working either. Does anyone have a clue on how to fixe it?
I’m coding with VSCode on Mac(version 10.11.6) and I installed psychopy 1.90.3.
DISPSIZE=(1440, 900) #Display of my screen. A tuple
#doit etre en RGB. Psychopy interprete de meme.
FGC=(-1,-1,-1) #foreground color textes et lignes.
BGC=(0,0,0) #background color. '''
experiment.py
'''#Window is a class
from psychopy.visual import Window, GratingStim, ImageStim
from constants import DISPSIZE, FGC
from psychopy.core import wait #une fct
import numpy as numpy
disp=Window(size=DISPSIZE, units='pix',fullscr=True)
img=ImageStim(disp,image='/Users/gassersaleh/Documents/Programmation/pratique_psychoexp/example.jpg')
fixmark=GratingStim(win=disp,mask="circle",size=15,pos=[-4,0],sf=3,colorSpace='rgb255') #(disp,radius=6,edges=64,lineColor=FGC,fillColor=FGC)
fixmark.opacity=3
fixmark.fillColor=FGC
fixmark.setColor([255,255,255]) #gives an inversed color
fixmark.draw()
disp.flip()
wait(1)
img.draw()
disp.flip()
wait(2)
disp.close()
Yes, I think the spatial frequency is the issue here. It is so high that the output is a constant, evaluated at the trough of the grating - changing the phase to be 0.5 recovers the desired colour.