Exemplo n.º 1
0
import atexit
from psychopy import visual, event, core, logging
import time

from os.path import join
import csv

from sources.experiment_info import experiment_info
from sources.load_data import load_config, load_train, randomization
from sources.screen import get_screen_res, get_frame_rate
from sources.show_info import show_info, show_image, read_text_from_file
from sources.trail import Trial
from sources.accept_box import AcceptBox

part_id, part_sex, part_age, date = experiment_info()
NAME = "{}_{}_{}".format(part_id, part_sex, part_age)

RESULTS = list()
RESULTS.append([
    'TRIAL_NR', 'TASK_NR', 'EXPERIMENTAL', 'ACC', 'RT', 'ANSWER_TYPE',
    'ANSWERS_ORDER'
])

RAND = ""  #str(random.randint(100, 999))

logging.LogFile(join('.', 'results', 'logging', NAME + '_' + RAND + '.log'),
                level=logging.INFO)


@atexit.register
def save_beh():
Exemplo n.º 2
0
import time
import random
from numpy.random import shuffle

from os.path import join
import csv

from sources.experiment_info import experiment_info
from sources.load_data import load_config, prepare_words
from sources.screen import get_screen_res, get_frame_rate
from sources.show_info import show_info
from sources.check_exit import check_exit
from sources.ophthalmic_procedure import ophthalmic_procedure
from sources.triggers import send_trigger, create_eeg_port, TriggerTypes, prepare_trigger

part_id, part_sex, part_age, experiment_version, date = experiment_info()
NAME = "{}_{}_{}_{}".format(experiment_version, part_id, part_sex, part_age)

RESULTS = list()
RESULTS.append([
    'TRIAL_NR', 'NAWL_NR', 'WORD', 'WORD_EMO', 'WORD_LIST', 'WORD_TYPE',
    'ANSWER', 'ACC', 'RT'
])

TRIGGERS_LIST = []
TRIGGER_NO = 0

RAND = str(random.randint(100, 999))

logging.LogFile(join('.', 'results', 'logging', NAME + '_' + RAND + '.log'),
                level=logging.INFO)