Now Shipping! – The EyeLink 3; combined head and eye tracking at up to 1000 Hz.

Template: Generate a Random Number
#1
Generate a Random Number

Required Experiment Builder Version: 1.10.1025 or higher
EyeLink Required: Yes
Type: Complete Example
Difficulty Level: Easy

This example illustrates:
  • How to use Python function random.randint() to generate a random number
  • How to set Duration Type property of the Timer trigger in either msec or frames
Description:

These examples modify the Simple experiment provided with the SR Research Experiment Builder Examples to demonstrate how to generate a random number and set it to the duration of a timer trigger. However, the random number could be assigned to any variable and used for many different purposes. The Simple example displays a single word on each trial.
  • The Simple_Timer_Duration_Random_Number.ebz example sets the duration of the word to a random number of msec. Note, the text will be displayed for slightly more or less time because all screen changes are time-locked to the screen refresh cycle.
  • The Simple_Timer_Duration_Frames_Random_Number.ebz example sets the duration of the text to 60-600 refresh rate.
**Additional detailed information about the project is given in the notes section for most nodes. To see notes for a given node, either mouse over that node or click on it to display the notes window. If the notes window is not visible, go to the "View" drop down menu in Experiment Builder, select "Properties", and check "Note".

NOTE: Please see our Randomizing Variables Outside of Data Source in Experiment Builder and Data Source Randomization in Experiment Builder Webinars for more randomization methods.

Instructions:
  1. Download the Simple_Timer_Duration_Random_Number.ebz and / or the Simple_Timer_Duration_Frames_Random_Number.ebz example from this message.
  2. Launch the Experiment Builder application.
  3. Unpack the file/s to a location on your Experiment Builder PC with "File menu -> Unpack".
  4. Open the project in Experiment Builder.
  5. Deploy the project to a new folder.
  6. Run the Simple_Timer_Duration_Random_Number.exe and / or the Simple_Timer_Duration_Frames_Random_Number.exe from the deployed directory.


.ebz   Simple_Timer_Duration_Frames_Random_Number.ebz (Size: 29.06 KB / Downloads: 24)

.ebz   Simple_Timer_Duration_Random_Number.ebz (Size: 28.86 KB / Downloads: 29)