psychopy

Trialhandler and time measuring in psychopy

纵饮孤独 提交于 2019-12-08 07:56:31
问题 For a go-NoGo Task I want to organize pictures with the data.TrialHandler class from psychopy: trials = data.TrialHandler(ImageList, nReps=1, method='random') Now I want to code a loop in which psychopy is going into the dictionary, is presenting the first set of pictures (e.g. A_n) and afterwards is going to the second set until the sixth set. I tried the following: import glob, os, random, sys, time import numpy.random as rnd from psychopy import visual, core, event, monitors, gui, logging,

convert eye-tracking .edf file to ASC/CSV format

天大地大妈咪最大 提交于 2019-12-08 05:57:27
问题 I have a recording of tracking data in .edf format (SR-RESEARCH eyelink). I want to convert it to ASC/CSV format in python. I have the GUI application but I want to do it programmatically (in Python). I found the package pyEDFlib but couldn't find an example to how convert the eye-tracking .edf file to .asc or .csv. What will the best best way to do it? Thanks 回答1: If I trust the page here: http://pyedflib.readthedocs.io/en/latest, you can run through all the signals in the file this way:

Shuffle two lists in the same order in python

為{幸葍}努か 提交于 2019-12-06 09:12:29
I have a question about shuffling, but first, here is my code: from psychopy import visual, event, gui import random, os from random import shuffle from PIL import Image import glob a = glob.glob("DDtest/targetimagelist1/*") b = glob.glob("DDtest/distractorimagelist1/*") target = a distractor = b pos1 = [-.05,-.05] pos2 = [.05, .05] shuffle(a) shuffle(b) def loop_function_bro(): win = visual.Window(size=(1280, 800), fullscr=True, screen=0, monitor='testMonitor', color=[-1,-1,-1], colorSpace='rgb') distractorstim = visual.ImageStim(win=win, image= distractor[i], mask=None, ori=0, pos=pos1, size