Full screen stimuli

Hi,

I am trying to build an experiment where I want the stimuli to go fullscreen, no matter where the experiment is deployed (i.e., irrespective of the screen size). I am not able to figure out how to do this.

I am also wondering, does someone here code their own stimuli from scratch? Is there an API for it? For instance, do the stimuli have to be in the form of a function that takes time as an input and spits out a matrix of the required size as output?

I am more comfortable writing code than using the GUI. Any help such as links, references, or code snippets would be super helpful.

Thank you very much!

Do you have a specific stimulus in mind (e.g., ImageStim, GratingStim)?

One solution that comes to mind is to get the screen size after you have created a window, and use that size for the size parameter of each stimulus that you want (this solution assumes that you are using PsychoPy as a package):

from psychopy import visual, event

w = visual.Window(size = (700, 700),  units = 'pix')

im = visual.ImageStim(w, r'image_file.jpg', size=w.size)
1 Like

Hi Christophe,

Thank you for the reply. I think I’ve figured out a sub-optimal way of doing this. I just draw() the stimuli at a very large size, and then flip() that on the screen. I think it’s a bit wasteful, but I can’t think of another way since the same script will be used on various monitors and they all need to display the stimuli fullscreen. I’m using the GratingStim function to draw the stimuli.

Cheers