Created
July 16, 2014 04:17
-
-
Save onesandzeroes/81d1adf475ce4fdf373d to your computer and use it in GitHub Desktop.
Number trial gen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
ambiguous_letters = ['I', 'O'] | |
letter_targets = [letter for letter in string.ascii_uppercase | |
if letter not in ambiguous_letters] | |
ambiguous_numbers = ['0', '1'] | |
number_targets = [digit for digit in string.digits | |
if digit not in ambiguous_numbers] | |
print(number_targets) | |
example_block = [ | |
{'target': '4', 'trial_type': 'cs', | |
'us_direction': 'clockwise', 'us_distance': 0}, | |
{'target': 'RANDOM', 'trial_type': 'cs', | |
'us_direction': 'clockwise', 'us_distance': 0} | |
] + [ | |
{'target': 'RANDOM', 'trial_type': 'distractor'} | |
] * 6 | |
print(example_block) | |
def create_trials(block): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment