Difficult - Help - Sequential stimuli within the same duration

Be careful with lengths and durations! I want to create a routine in which there will be 5 presentations of a 4cm line and 5 presentations of a 10cm line in a random order. For the 4cm line, there will be 2,3,4 or 5 smaller lines with random lengths to make up 4cm all together for each trial. There will also be inter-line intervals. The presentation of each smaller line and inter-line interval will be between 400ms and 1100ms with the total duration of each sequence (trial) being between 1.2s and 4s. The same holds for the 10cm line but with random lengths to make up 10cm all together for each trial. How can I create this one in Psychopy?

I would create it in Builder with six polygon components, assuming that’s the maximum number of lines that can be seen on screen at once. How are the smaller lines arranged?

You could specify all the lengths in a spreadsheet with lengths being 0 for absent lines.

What is the task? Is it local only? If so, you could use cm units if you set up your monitor.

Hi Wake Carter, thank you for your reply.

The smaller lines can be 2,3,4 or 5 in a trial. For example, a 4cm trial of 3 lines can be 5s cross, empty interval, line (1.2cm), empty interval, line (2cm), empty interval, line (0.8cm).

The length of the lines in each trial is random but their total in each trial must be 4cm or 10cm.

The task is local yes and I use cm as units.

Moreover, concerning the durations, the presentation duration of each line and the inter-line interval are chosen between 400 and 1100ms, with a total duration for the sequence being between 1.2s and 4s.

That sounds like you only need one polygon (or maybe two if the reference line is also displayed), because the smaller lines are only presented one at a time. The easiest way to accomplish this would be to have concentric loops where the spreadsheet for the outer loop specifies the number of trials in the inner loop (along with their lengths and durations).

What does the participant need to do?

I think it’s important to set a limit in terms of how precise the smaller lines can be measured, and how much variance you want. I think wakecarter’s solution of just having a spreadsheet with the lengths pre-determined is going to be the easiest, and most experimentally valid. Using any kind of random function/python code to randomize the lengths of the smaller lines without any type of constraints is going to be messy. I would suggest you think about how precise you want want measurements to be, any minimum or maximum values (for example 0.1cm, 0.1cm, 3.8cm I imagine is not necessarily a useful variation), and the “step size” or increment value for your values (e.g. using values that are multiples of 0.1cm, 0.2cm, or 0.5cm).

Issac

Hi to both of you and thank you for your reply.

I am really confused about this experiment. Please read all the instructions to understand it.

The practice should have

  • Each trial should begin with a 5s cross and a 5s blank interval.
  • 5 presentations/trials of the 4cm line and 5 presentations/trials of the 10cm line in a random order.
  • Each of these 10 presentations/trials should have either 2, 3, 4 or 5 small lines (combinations) chosen randomly. The length of each one of them should be an integer number and each of these four combinations should add up to either 4cm or 10cm.
  • Moreover, there should be an interline interval between each line. The duration of each interline interval and of each line should be from 400ms up to 1100ms with a total duration for the sequence being between 1.2s and 4s.
  • During this practice, participants should only see these 10 presentations without doing anything else.

In the experiment after the practice:

  • There are 7 probe stimuli (4, 5, 6, 7, 8, 9 and 10).
  • Each trial start with a 5s cross, then a 5s blank interval and then one of these stimuli. For example for stimulus 6, there were 6 small lines, the length of each small line was an integer number and the total length of stimulus 6 was 6cm. The duration of each small line was an integer number and the total duration of stimulus 6 was 6s. The same holds for the other stimuli. After the presentation of the stimulus, there is a question “Was the length closer to the short or long standard?” Press d if it was closer to the short standard and k if it was closer to the long standard.
  • Moreover, each stimulus was presented with and without clicks. With clicks, the clicks started in the beginning of the 5s blank interval and lasted until the end of each stimulus. Without clicks, there was no sound.
  • The intertrial interval was randomly chosen between 1 and 3s.
  • There were 14 trials in each of the 8 blocks.

Regards

I doubt you mean this, since it can only be solved if all 6 lines are 1cm long and presented for 1 second each.

Hi Wake,

The paper does not specify it and I assumed that this might be the structure. I just sent an e-mail to the author to clarify the information.

If you would like the Open Science Tools team to build the experiment for you from the brief, you can request it via Consultancy Services — PsychoPy®

However, if the original author used PsychoPy, you might be able to use their experiment as a starting point.