def spawn_pandas(save_path=None, port=5005): stimulation = stimuli.ClosedLoopStimChoice(window_size=(1024, 1024), gui=True, publisher_port=5008, live_update=True, save_path=save_path, debug=False) sub = utils.Subscriber(topic="stim", port=port) sub2 = utils.Subscriber(topic="stim", port=5006, ip=r"tcp://10.122.170.169:") sub3 = utils.Subscriber(topic="stim", port=5010) monitor = utils.MonitorDataPass(sub) monitor2 = utils.MonitorDataPass(sub2) monitor3 = utils.MonitorDataPass(sub3) stimulation.run()
def spawn_pandas(port=5005, anne=True): sve_pth = datetime.now().strftime("%d.%m.%Y__%H.%M.%S") + '_stims.txt' stimulation = stimuli.ClosedLoopStimChoice(gui=True, live_update=True, debug=True, publisher_port=5008, save_path=sve_pth) sub = utils.Subscriber(topic="stim", port=port) if anne: sub2 = utils.Subscriber(topic="stim", port=5006, ip=r"tcp://10.122.170.169:") sub3 = utils.Subscriber(topic="stim", port=5010) monitor2 = utils.MonitorDataPass(sub2) monitor3 = utils.MonitorDataPass(sub3) monitor = utils.MonitorDataPass(sub) stimulation.run()
def spawn_pandas(port=5005, freq_max=101): tex_size = (1024, 1024) freqs = np.arange(freq_max) input_textures = { 'freq': {}, 'blank': textures.BlankTexXY(texture_size=tex_size) } for f in freqs: input_textures['freq'][f] = textures.GratingGrayTexXY( texture_size=tex_size, spatial_frequency=f) stimulation = stimuli.ClosedLoopStimChoice(textures=input_textures, gui=True) sub = utils.Subscriber(topic="stim", port=port) monitor = utils.MonitorDataPass(sub) stimulation.run()
def stims(port="5005"): stimulation = stimuli.ClosedLoopStimChoice(textures=input_textures, save_path=svepath) sub = utils.Subscriber(topic="stim", port=port) monitor = utils.MonitorDataPass(sub) stimulation.run()
import numpy as np from pandastim import textures, stimuli, utils svepath = r'C:\Soft_Kitty\Anaconda3\envs\clean_pstim\Lib\site-packages\pandastim\experiments\temp1.txt' tex_size = (1024, 1024) freqs = np.arange(101) input_textures = { 'freq': {}, 'blank': textures.BlankTexXY(texture_size=tex_size) } for f in freqs: input_textures['freq'][f] = textures.GratingGrayTexXY( texture_size=tex_size, spatial_frequency=f) stimulation = stimuli.ClosedLoopStimChoice(textures=input_textures, save_path=svepath) if __name__ == '__main__': sub = utils.Subscriber(topic="stim", port="5005") monitor = utils.MonitorDataPass(sub) stimulation.run()