Using expInfo variable for image size

I have a variable that will be passed into my experiment through the URL and into a corresponding box in the expInfo box at the beginning. I need to use this variable to determine the size of my images.

The variable I’m using is called deg2px. For size [w,h] in the image properties, I have $expInfo[‘deg2px’]. This works perfectly fine in builder and sizes the images appropriately. However, when I run the experiment online, none of my images show up. There is no error reported, but I assume that it is unable to read the variable.

Any ideas on what’s going wrong here and what to try?


I think you’d need to post a link to the repository of your study so we can see what the code says. Possibly the issue is that expInfo['deg2pix'] isn’t being converted from inside the parameter in the dialog, although it would be from a code component (this is something that has been mentioned elsewhere and we need to fix). The workaround, if so, is to have a Code Component that does this: stimSize = expInfo['deg2pix'] and then set the value of the stimulus to be $stimSize

That’s what I was thinking of doing to just avoid the problem for now.