Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Randomizing Selected Stimulus and Stimulus Order

Good afternoon :)

I am running a task on habituation in OpenSesame. I need to randomize both:

  1. Stimulus set - we have 3 different sets
  2. Order of Stimulus set - each set consists of 2 images (a - simple and b - complex).

Each participant should view one of the stimulus sets in random order.

I have tried to randomize these both in inline scripts prior to my block_loop.

How can I reference these in my block loop to ensure only one stimulus set is displayed?

Comments

  • Hi @VeerleVijverberg ,

    I have tried to randomize these both in inline scripts prior to my block_loop.

    And did it work? If not can you share more infos on the problems that you encountered? If you want to randomize the stimulus set across subjects, you probably want to counterbalance it (i.e. make sure that all sets are used equally often). To do so, I would not randomly choose the set, but pick it based on the subject_nr . For example, in an inline_script that you put as first item in your experiment, you can do something like this:

    if subject_nr % 3 == 0:
        stimulus_set = { "...", "...", "..." ) # leaving out details
    elif subject_nr % 3 == 1:
        stimulus_set = { "---", "---", "---" ) # leaving out details
    elif subject_nr % 3 == 2:
        stimulus_set = { ":::", ":::", ":::" ) # leaving out details
    

    Does this make sense?

    How can I reference these in my block loop to ensure only one stimulus set is displayed?

    There are ways do manually set the datamatrix if the loop table with Python code. If you search the forum, you might find discussions talking about this (if not you can tag Sebastiaan to tell you how). In this post, I explain how you can bypass the loop table and producing the trial loop from within an inline_script.

    Maybe this helps!

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.