BioMotionLab / TUX

A framework for experiments in Unity and VR
https://biomotionlab.github.io/TUX/
Other
29 stars 4 forks source link

Skipping Trials #23

Closed krishnanpc closed 3 years ago

krishnanpc commented 3 years ago

Thank you for the great tool. We have been using it to build an experiment in VR and loving it so far. Just one question, What are some good ways to skip some trials by condition?

We wrote our own custom script to skip just using combination of conditions, just was wondering if there is a more elegant way within TUX to do it. Perhaps something that we can run on the experiment design table to filter out the irrelevant ones and then run only those trials?

EDIT: I tried the SkipToNextTrial method, but it was not letting me exit the block.

Thanks

AdamBebko commented 3 years ago

Hello, and thanks for your interest in the tool!

Perhaps it would help to explain why you're trying to skip trials. It's not clear to me what the use-case is here. If I understand, you're trying to skip a trial when it has the value of a certain variable, why not just remove that value from the design? do you want the user to skip it? or set it up to skip before runtime?

krishnanpc commented 3 years ago

Thank you for your quick response. In our exp, we also have multiple blocks. (In some block we don't want it to iterate through all variable combinations.

For example, We have blocks A , B and C and the variables 1, 2 and 3.

And for block A, we don't want the trial with variable 2 and 3. But we still need it for Block B and C, hence we couldn't remove it from the design.

So our custom script just looked for the variable combination and skipped the trail. But this process are resulting in some frame drops (its a bit significant, when an entire section of the block needs to be discarded)

If there is a way to set it up before runtime, it would be ideal.

Thanks so much once again.

AdamBebko commented 3 years ago

I think the best bet for you is to create pre-generated trial tables.

You set up your design file the way you want, then use the design inspector to export its trial table. Then you can edit it and reimport it at runtime.

You could either edit it manually, or write a separate script to filter out certain conditions from the trial table file.

For more info, see the entry on manual trial tables in this docs page: https://biomotionlab.github.io/TUX/docs/AdvancedOptions

Let me know if you run into problems. Going to close this for now.