Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

[solved] Average Response time of a voice key.

ezerkarezerkar Posts: 18
edited January 2014 in OpenSesame

Hi,

I'm using the inline script "listen" published in the forum (great feature BTW) and I manage to get RT for the vocal response in the logger, but I don't no how to add an avg_rt variable that would alow me to add a feedback slide every now an then.

Any Ideas?

Thnaks in Advance

Ezer

Comments

  • sebastiaansebastiaan Posts: 2,737
    edited November 2013

    Hey Ezer,

    You can manually keep track of feedback variables with something like the snippet below. Obviously, you'll have to set my_response_time and is_correct yourself.

    my_response_time = 1000 # Indicates response time
    is_correct = True # Indicates whether the response is correct
    
    self.experiment.total_responses += 1
    if is_correct:
        self.experiment.total_correct += 1
    self.experiment.total_response_time += my_response_time
    self.experiment.acc = 100. * self.experiment.total_correct / self.experiment.total_responses
    self.experiment.avg_rt = self.experiment.total_response_time / self.experiment.total_responses
    self.experiment.accuracy = self.experiment.acc
    self.experiment.average_response_time = self.experiment.avg_rt
    

    Hope this helps!

    Kindest regards,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • ezerkarezerkar Posts: 18
    edited 4:56AM

    Thanks, couldn't get it to work though, I'l look into it when I have time.

    Thnaks again
    Ezer

Sign In or Register to comment.