I’m writing to ask if anyone could tell me how I can avoid playing the movie stimuli twice. When I set nReps to 0 in the loop properties, the movie stimuli play neither offline nor online. I would like to know if I need a code component to fix this problem or if there is any other solution?
Thank you in advance!
You haven’t yet described the problem with sufficient detail or clarity for anyone to suggest anything meaningful.
Thanks for your reply.
I am using PsychoPy 2020.2.6. Please find below the screenshot from my experiment. As you can see, there is a “bat_md” movie stimulus and I would like that it appears just once, but I don’t know how. When I put 1 in nReps, it appears twice. Why does putting 0 in nReps halt the experiment and could you please suggest a solution?
OK, thanks for the screenshots, which clarify things.
nReps refers to how many times the conditions file will be repeated. You have two rows in your conditions files, hence with
1, each row will be presented once, giving you two trials.
Hopefully it makes sense why putting
0 in that field means the loop won’t run at all.
If you only want to show a single movie, you don’t need either a loop or a conditions file. Just put the actual name of the movie file in the movie component.
Thank you again.
Since I will add 44 movie stimuli, I would like to embed them within one loop and avoid the replication of the stimuli as well. The conditions file contains the variable “CorrAns”, hence it is needed to get an output data file specifying the accuracy of answers.
Could you please tell me if there is any method to avoid this repetition? I’ve tried leaving nReps blank, but this gives me the same result as with nReps=0.
If you want to play one random movie from your spreadsheet then you need nReps = 1 and then either trials.finished= True in a code component inside the loop or add a variable to selected rows (which I personally find trickier but someone else could help with).
Thank you! When I add a code component to each routine as in the following, I get red rid of the repetitions, but the output data file gives me the response only for the first routine.
Could you please have a look at the screenshot and bring any possible error to my attention?
So you are getting a response recorded from keyy in bad but nothing from deeep?
Please could you show your keyboard (?) response in deeep?
Yes, exactly. Here is the keyboard response for deeep.
That looks fine. Is there any evidence that deeep is being displayed at all? If not then I would move code_3 to deeep. It may be breaking out of the loop at end end of the current routine rather than at the end of the loop.
After applying your last suggestion, I’ve piloted the experiment on Pavlovia and I still get the output data file with just one recorded response. Do you have any idea about how I can add a variable to selected rows in order to avoid the repetition and get all responses?
Please could you show your data file.
I think I might be misunderstanding your problem.
Each loop of trials should create one row in your data file.
Do you not have enough rows (I thought you only wanted one because you didn’t want trials to repeat) or not enough columns (because you are only getting data from one routine and not the other)?
I appreciate your answers!
The experiment I want to carry out contains 56 stimuli and I would like to group these 56 routines within one loop. This loop should contain the conditions file that has 56 rows. Actually, I tried having 56 routines and 56 loops but this gives me chaotic output data. Is there a tip through which I can embed the 56 routines within one loop and avoid the repetition of the routines?
Regarding the screenshots I’ve shared, the experiment contains only two routines within one loop and you can find below the screenshot of the Excel file I 've used for this non-fully-fledged experiment.
Do you want your participants to see 56 different movies in random order with no repetition?
If so, you probably want one routine (perhaps containing two text stimuli, one movie stimulus and one keyboard response) and one loop.
In PsychoPy you use the variables in the Excel file to customise the routine.
You would only need code if you want to randomise whether, say, bat appears as W2 or W9.
Yes I want my participants to see 56 different movies with no repetition.
If I understand well, you suggest that I should have 56 routines and 56 loops. So, each routine contains one movie, one text and the keyboard response and each loop has a conditions file containing only one row. So, it is not possible to have the 56 routines within one loop, right?
When I said one routine and one loop I meant just that, not 56.
Thank you for your reply. Unfortunately, the experiment won’t run when I include all my video stimuli in one routine.
Why not? How are you including your video stimuli?
Please find below the two ways in which I tried designing the experiment:
- This way, I don’t have repetitions but it is time-consuming and the output data is not perfect (see Excel file)
- Trying your suggestion of one routine as follows:
Both stimuli overlap and the keys for bat and bed appear at the same time.
Did you know that you can specify a variable as the movie file?
Option 2 is correct except that you should only have three components (one of each type) and add variables from your spreadsheet to them (prefixed with a dollar sign)