Commits

Dan Fuchs  committed 8339396

final changes

  • Participants
  • Parent commits fdcc671

Comments (0)

Files changed (3)

 *.pyc
 *.sw*
 results/*
+.DS_Store
 # The key the user presses to select the word on the left
 left_key = 1
 
+# Whether or not to display the left/right keys under the choice words,
+# True or False
+display_keys = True
+
 # The message that shows during the initial few seconds of an audio clip
 wait_message = Please wait...
 

File experiment.py

 import copy
+import datetime
 import decimal
 import optparse
 import os
         self.right_key = self.get_config('right_key')
         self.left_key = self.get_config('left_key')
         self.results_dir = self.get_config('results_dir')
+        self.display_keys = self.get_config('display_keys')
 
         # Choose our instructions
         self.instruction_set = random.randint(1, len(instructions.instructions) + 1)
         trials.data.addDataType('testWordWaitTime')
         trials.data.addDataType('soundStopped')
         trials.data.addDataType('practiceWord')
+        trials.data.addDataType('timeStamp')
 
 
         instruction_text = instructions.instructions[self.instruction_set - 1]
                                     'soundClip_raw',
                                     'testWordWaitTime_raw',
                                     'soundStopped_raw',
-                                    'practiceWord_raw'],
+                                    'practiceWord_raw',
+                                    'timeStamp_raw'],
                            delim=',')
 
         thank_you_stim = visual.TextStim(w, text=self.thank_you_message)
         global channel
         global w
 
+        start_time = datetime.datetime.now()
         trial_key = {}
         word_order = random.randint(0,2)
         if word_order == 1:
             trial_key[self.left_key] = 'content'
 
 
-        right_stim_text = "%s\n%s" % (trial[trial_key[self.right_key]],
-                                      self.right_key)
-        left_stim_text = "%s\n%s" % (trial[trial_key[self.left_key]],
-                                     self.left_key)
+        if self.display_keys == 'True':
+            right_stim_text = "%s\n%s" % (trial[trial_key[self.right_key]],
+                                          self.right_key)
+            left_stim_text = "%s\n%s" % (trial[trial_key[self.left_key]],
+                                         self.left_key)
+        else:
+            right_stim_text = trial[trial_key[self.right_key]]
+            left_stim_text = trial[trial_key[self.left_key]]
+
 
         test_stim = visual.TextStim(w, text=trial['test'],
                 bold=True,
         else:
             trials.data.add('soundStopped', not channel.get_busy())
         trials.data.add('practiceWord', practice)
+        trials.data.add('timeStamp', start_time.__str__())
 
 
     def stop(self):