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
from psychopy import core, visual, event | |
#If scrn=0, graphics window fills entire screen correctly | |
#If scrn=1, the graphics window is vertically offset so doesn't draw to entire screen, so you won't see the 'Hit Q to quit' message as it is off screen | |
scrn=1 | |
myWin = visual.Window(fullscr=1,screen=scrn) | |
# INITIALISE SOME STIMULI | |
gabor = visual.GratingStim(myWin, tex="sin", mask="gauss", texRes=256, | |
size=[1.0, 1.0], sf=[4, 0], ori = 0, name='gabor1') |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Text is not vertically centered. Instead, 'center' coordinate it is drawn at is actually a point partway up from the text's vertical center. | |
""" | |
from __future__ import division | |
from psychopy import visual, core, event |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Demo of TrialHandler | |
""" | |
from __future__ import absolute_import, division, print_function | |
from builtins import range |
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
#Uploaded in response to query on psychopy list: https://groups.google.com/group/psychopy-users/browse_thread/thread/c65e453edf530f8 | |
#asking for code to input a string. | |
#Program flashes string on screen, and user tries to type it in. Supports backspace but no other editing special characters. | |
#Checks whether subject got it right | |
#Alex Holcombe alex.holcombe@sydney.edu.au 21 August 2012 | |
#licensing: CC-BY whch means do whatever you want with it, with an attribution to the author. If you want permission to use it without | |
#attribution, just contact me. | |
from psychopy import monitors, visual, event, data, logging, core, sound, gui | |
import psychopy.info |
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
#!/usr/bin/env python | |
""" | |
by Alex Holcombe | |
license: CC-ZERO | |
This code is a mess and a melange of sound processing, but was | |
uploaded because booradleyboo asked about sound processing on the google groups. | |
""" | |
import sys,os | |
import math | |
from os import path |
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
from psychopy import visual, event, core | |
import numpy as np | |
"""Record response latency | |
""" | |
respClock = core.Clock() | |
Hz = 60 | |
#create a window to draw in | |
bgColor=np.array([-1,-1,-1]) | |
scrn = 0; fullscrn= 0 |
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
from psychopy import visual, event, core | |
import numpy as np | |
"""Record response latency | |
""" | |
trialClock = core.Clock() | |
Hz = 60 | |
#create a window to draw in | |
bgColor=np.array([-1,-1,-1]) | |
scrn = 0; fullscrn= 0 |