Subselecting blocks in Pavlovia

URL of experiment: Pavlovia

Description of the problem:

Hi, my problem is the following. I have an experiment, which consists of 80 blocks in total, but I want to split those into 4 blocks per participant. The way I did this locally was to use np.random.choice(range(0,79), size =4). However, this doesn’t work with my online version of the experiment because I am using numpy. Any idea on how to solve this issue?

Additionally I would also like to not have this in a random order. My goal is to have block 0-3 for participant 1; then block 4-7 for participant 2 etc; and then after participant 20 to start over from block 0-3 for participant 21. I hope this makes sense.

Also I am super new to all of this, so if I have missing information in the post please let me know.

If you use one of my online tools (see below) for consecutive assignment of participant numbers then you could have in a Begin Experiment code component:

useRows = str((int(expInfo['participant'])-1)*4) + ":" + str((int(expInfo['participant'])*4)-1)

Then set the selected rows to “useRows”

Links for tools

https://moryscarter.com/vespr/pavlovia.php

https://moryscarter.com/vespr/portal/

Thank you so much! This worked great, but now I have another issue. At the start of the block I want to present the block number the way I am doing it now is with str(blocks.thisIndex + 1), but it doesn’t seem to do it it just shows 4 for each block. I also tried using blocks.thisN, but the issue was the same. Any input on how to deal with this?

I solved the issues! Everything works now. Thank you for your help :slight_smile:

1 Like