Skip to content

Instantly share code, notes, and snippets.

View nmningmei's full-sized avatar

Ning Mei nmningmei

View GitHub Profile
@nmningmei
nmningmei / white_noise.py
Created April 29, 2019 20:34 — forked from dilawar/white_noise.py
Create white noise stimulus in python using psychopy
# Generate noise frames
# dependencies: psychopy, python-numpy, python-pyglet
from numpy import random
from psychopy import visual
# create a window
win = visual.Window([800, 600], monitor="testMonitor", units="deg")
maskDuration = 180 # Duration of mask in frames
visualNoiseSize = 512 # Dimension in pixels of visual noise. Must be a power of 2