Ejemplo n.º 1
0
# If testing, the blank image.
if config.TESTING:
    #config.BLANK_FILE = config.IMAGE_TEMPLATE.format('blank')
    #config.BLANK_IMAGE = cv2.resize(np.flipud(imread(config.BLANK_FILE)), dsize=(config.INPUT_XSIZE, config.INPUT_YSIZE))
    config.TEST_WINDOW_XSIZE = 480
    config.TEST_WINDOW_YSIZE = 480

# Keypress during a trial.
if config.NO_NUMPAD:
    config.KEY_LIST = [str(x) for x in range(10)]
else:
    config.KEY_LIST = ["num_" + str(x) for x in range(10)]

# When saving the config, excluding some variables due to size.
config.EXCLUDED = ['STIMULI', 'GRID', 'IMAGES', 'BLANK_IMAGE', 'PROCESSOR']

# Here, we make our main experiment, only if called from the command line.
if __name__ == "__main__":

    # We initiate the user details and present a dialog to the user to get those details.
    config.details = {
        "datetime": datetime.strftime(datetime.now(), config.DATETIME_FORMAT),
        "participant": ""
    }
    dialog = gui.DlgFromDict(config.details,
                             title="PROTOTYPE",
                             fixed=["datetime"])

    # We interpret the dialog actions and initiate data files if proceeding.
    if dialog.OK:
Ejemplo n.º 2
0
# If testing, the blank image.
if config.TESTING:
    #config.BLANK_FILE = config.IMAGE_TEMPLATE.format('blank')
    #config.BLANK_IMAGE = cv2.resize(np.flipud(imread(config.BLANK_FILE)), dsize=(config.INPUT_XSIZE, config.INPUT_YSIZE))
    config.TEST_WINDOW_XSIZE = 480
    config.TEST_WINDOW_YSIZE = 480

# Keypress during a trial.
if config.NO_NUMPAD:
    config.KEY_LIST = [str(x) for x in range(10)]
else:
    config.KEY_LIST = ["num_" + str(x) for x in range(10)]

# When saving the config, excluding some variables due to size.
config.EXCLUDED = [
    'STIMULI', 'GRID', 'IMAGES', 'BLANK_IMAGE', 'PROCESSOR_TEST',
    'PROCESSOR_CONTROL'
]

# Here, we make our main experiment, only if called from the command line.
if __name__ == "__main__":

    # We initiate the user details and present a dialog to the user to get those details.
    config.details = {
        "datetime": datetime.strftime(datetime.now(), config.DATETIME_FORMAT),
        "participant": ""
    }
    dialog = gui.DlgFromDict(config.details,
                             title="PROTOTYPE",
                             fixed=["datetime"])

    # We interpret the dialog actions and initiate data files if proceeding.