![]() |
running experimental trials
i recently created a makeshift balance board apparatus which was to be used as part of an experiment for a visuo-motor psychology experiment. after alot of trial, error, and some invaluable advice from the folks on this forum, i finally got the physics of the experiment running, but now i'm having difficulty getting the experiment to run as a series of trials.
this is the framework i'm going off of: Code:
def experiment(): Code:
experiment_data = open(str(id) + '_experiment_data.txt','w') right now, i have a loop set in the pre phase: Code:
trials = [10] Code:
while isDone is False: any help would be greatly appreciated, thanks in advance. |
Where are your yield statement(s) for the prephase function?
|
i didn't have yield statements. i started out using vizact.ontimer within the while-loop to implement an elapsed time function :
startTime = viz.tick() def elapsed(): elapsedTime = viz.tick()-startTime vizact.ontimer(0, elapsed) i wanted to use 'elapsed' to monitor each trials time and set isDone to True when the time hit 20 seconds. the partner i am working with pointed out that the preceeding script wouldn't create a timer at the start of the while loop like i had intended but would instead create timerS nonstop once the while loop began. as a result, i think i created a massive memory leak... how would i go about implementing a yield statement to get an elapsed time function? |
Quote:
The viztask documentation describes these commands and how to create a custom condition. |
All times are GMT -7. The time now is 01:19 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC