Range replicator won't accept expression

Rosilari's Avatar

Rosilari

10 Apr, 2017 09:59 AM

Hi Christopher,

hope you're fine.

We are currently running an experiment on 6 different servers at one time and we need to load different stimuli per each monitor.
We would love to do this in a way that does not require to create six separate protocols.

My idea was to index image names as: "monitor$monitornumber_image$imagenumber" and store the reference to "monitornumber" somewhere, i.e. among the saved variables. This way you could save a different monitornumber per server and load easily the correct batch of stimuli.
However, this is not allowed since you cannot (of course) save local variables outside the protocol. Moreover, range_replicator won't accept either global variables or expressions.

Is there a way i'm missing to do this?
Please ask me about any doubt you may have

Thanks in advance!
Rosilari

  1. Support Staff 1 Posted by Christopher Sta... on 12 Apr, 2017 01:31 PM

    Christopher Stawarz's Avatar

    Hi Rosilari,

    The attached example demonstrates one possible alternative. It defines a top-level stimulus group (images) that contains a nested stimulus group for each monitor. The monitors are enumerated explicitly, but the images for each monitor are defined via range replicators. The protocol uses a global variable (monitornumber) to select the image set to use. This value of this variable can be saved to and loaded from saved variable sets.

    This isn't as elegant as your original idea. It also forces you to load the images for every monitor every time you run. However, it does save you from having to create a separate protocol for every monitor.

    If you have any questions, please let me know.

    Chris

  2. Christopher Stawarz closed this discussion on 28 Apr, 2017 01:53 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac