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
# 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 |
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
import numpy as np | |
from matplotlib import pyplot as plt | |
from scipy.spatial import distance | |
# create data the center at zero, 36 words by 100 voxels | |
zero_mean_data = np.random.rand(36,100) | |
zero_mean_data = zero_mean_data - zero_mean_data.mean(1).reshape(-1,1) # so each row has mean zero | |
# create data that is not center at zero, 36 words by 100 voxels | |
sim_data = zero_mean_data.copy() |