Hello everyone, I am trying to create an experiment where participants will see lines with different lengths and they will reproduce them. For that, I need to create a loop and I can create it in two ways: using an Excel file or using code component. In my Excel file, I created two columns : unique_lines (1…12) and line_polygon_pixels (32 to 384) but for some reason it doesn’t work. Do I have to first create a sample polygon and then add the loop or am I missing something else? Thank you!!
Hello,
Can you please share images of your Excel file as well as an image of your components?
To be precise, how did you set the width of the polygon?
Chen
Hi!!
So at first I didn’t set a polygon in the builder and tried the loop but it didn’t read the Excel I guess and I just saw a gray background when I clicked run(no error code). Then, in the builder, I created a 32px vertical line, and when it ran, I saw the 32px line a couple of times, not the lines I was supposed to see from the Excel file. Attaching the screenshots:
Thank you very much for your help!!
Can you please share the polygon as well?
Maybe sharing the experiment would be a good idea.
Thanks,
Chen
You can share the file.
But where do you set the width of your polygon to correspond with the spreadsheet?
It looks like it’s set to 32, constant.
You need to set your size to correspond with the variable line_polygon_pixels
:
And set it to every repeat
as well.
here it is: line_lastrun.py (28.0 KB)
ok, I just changed it to every repeat but what do you mean where do I set the width of my polygon to correspond with the spreadsheet
Hi, now that I have 12 sizes in my spreadsheet I tried entering the sizes (32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384) but it didn’t work because we’re supposed to enter 2 values. How can I set the size to correspond with the spreadsheet as you said?
Thank you!!
How about $[test,test] ?
Hi, are you saying I should enter $[32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384] because it doesn’t work.
No
I thought test was the name of your spreadsheet column.
I just entered the name of the column and it worked, thanks!!!