Home | | News | | Documentation | | Tutorial | | Screen Cast | | Download | |

Putting it all together, again.

During the actual experiment, the stimuli are generated through use of place_text_image. place_text_image calls two other functions, get_text_image and placing_rect. get_text_image draws given text (for example "Red") onto a Surface and Returns the Surface for use in placing_rect. placing_rect creates a Rect object with dimensions of the Surface returned from get_text_image and centers it on the background Surface passed. place_text_image then blits the Surface with text onto the Surface passed at the position of the Rect.

Here is some further clarification.

After each trial, output_trial is called and is passed a list containing the particular pieces of data we wish to save. In our case, we keep track of things such as subject number, condition number, stimuli presented, type of instructions, hit or miss, etc...

Finally, output_trial writes the line of data to the data file set up earlier, self.datafile. In this experiment, the data file was named based on the current subject, thus this data file is named '4.dat'.

Previous || 1 2 3 4 5 6 7 8 || Next

Our work is supported by grants from

Copyright 2008-2013 - Todd Gureckis - New York University