Selection variables

Hi Chris,
I was wondering if there has been any innovation on selection variables.
The way we currently use them is to have a hard-coded list of numbers in the mwel (e.g. 0, 1, 2, 3, etc) such that there are a fixed number of potential values in each experiment that is not controllable by a variable set. The issue is that in order for stimulus conditions to be evenly distributed, the hard-coded number needs to be divisible by the number of stimulus conditions, which is often a frustrating constraint.
Are there ways of more flexibly updating the values of the selection variables that I’m not aware of? Or is there an alternative solution?
Thanks,
Lindsey.

Hi Lindsey,

At present, the “values” parameter of a selection variable can include range expressions with variable bounds. This lets you write things like

values = 0:count

where count is a variable. However, the parameter is evaluated when the experiment loads, and the set of selectable values can’t be changed after that. This means that, as you’ve noted, loading a variable set won’t have any effect on selection variables.

It doesn’t have to be that way, though. Perhaps we could add a new parameter that, when set to true, would make reset_selection re-evaluate the set of values. That seems reasonable and not too difficult to implement.

As for an alternative solution, it should be pretty straightforward to implement a selection-variable-like mechanism using Python. If you can tell me exactly how you’d like it to work, I can code up an example for you.

Cheers,
Chris

Hi Chris,
Yes- I had the same thought that a python script could solve this problem pretty easily.
I’ll try to make that work and will bug you if I get stuck.
Lindsey.