In [1]:
%load_ext autoreload
%autoreload 2
%cd -q ../scripts/
from default_param import *

%matplotlib inline

FLE

In this script the CONDENSATION is done for rightward and leftward motion of a dot stimulus, at different levels of noise. also for flashing stimuli needed for simulation of flash initiated and flash_terminated FLEs. The aim is to generate generate (Berry et al 99)'s figure 2: shifting RF position in the direction of motion.

Initialization of notebook


In [2]:
%%writefile experiment_SI_controls.py
"""
A bunch of control runs

"""
import MotionParticlesFLE as mp
gen_dot = mp.generate_dot
import numpy as np
import os
from default_param import *

image = {}
experiment = 'SI'
N_scan = 5
base = 10.

#mp.N_trials = 4
for stimulus_tag, im_arg in zip(stim_labels, stim_args):
#for stimulus_tag, im_arg in zip(stim_labels[1], stim_args[1]):
    #for D_x, D_V, label in zip([mp.D_x, PBP_D_x], [mp.D_V, PBP_D_V], ['MBP', 'PBP']):
    for D_x, D_V, label in zip([mp.D_x], [mp.D_V], ['MBP']):
        im_arg.update(D_V=D_V, D_x=D_x)

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                D_x=im_arg['D_x']*np.logspace(-2, 2, N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label),
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                D_V=im_arg['D_V']*np.logspace(-2, 2, N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                sigma_motion=mp.sigma_motion*np.logspace(-1., 1., N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                K_motion=mp.K_motion*np.logspace(-1., 1., N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                dot_size=im_arg['dot_size']*np.logspace(-1., 1., N_scan, base=base))
        
        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label),
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                sigma_I=mp.sigma_I*np.logspace(-1, 1, N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label),
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                im_noise=mp.im_noise*np.logspace(-1, 1, N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label),
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                sigma_noise=mp.sigma_noise*np.logspace(-1, 1, N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label),
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                p_epsilon=mp.p_epsilon*np.logspace(-1, 1, N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                v_init=mp.v_init*np.logspace(-1., 1., N_scan, base=base))

        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                v_prior=np.logspace(-.3, 5., N_scan, base=base))
        
        _  = mp.figure_image_variable(
                os.path.join(mp.figpath, experiment + '-' + stimulus_tag + '-' + label), 
                N_X, N_Y, N_frame, gen_dot, order=None, do_figure=do_figure, do_video=do_video, N_quant_X=N_quant_X, N_quant_Y=N_quant_Y,
                fixed_args=im_arg, 
                resample=np.linspace(0.1, 1., N_scan, endpoint=True))


Overwriting experiment_SI_controls.py

In [3]:
%run experiment_SI_controls.py


Studying CONDENSATION by changing image along variable(s) : {'D_x': array([  1.0000e-02,   1.0000e-01,   1.0000e+00,   1.0000e+01,   1.0000e+02])}
Studying CONDENSATION by changing image along variable(s) : {'D_V': array([  1.0000e-02,   1.0000e-01,   1.0000e+00,   1.0000e+01,   1.0000e+02])}
Studying CONDENSATION by changing image along variable(s) : {'sigma_motion': array([ 0.01  ,  0.0316,  0.1   ,  0.3162,  1.    ])}
Studying CONDENSATION by changing image along variable(s) : {'K_motion': array([ 0.0001,  0.0003,  0.001 ,  0.0032,  0.01  ])}
Studying CONDENSATION by changing image along variable(s) : {'dot_size': array([ 0.005 ,  0.0158,  0.05  ,  0.1581,  0.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'sigma_I': array([ 0.025 ,  0.0791,  0.25  ,  0.7906,  2.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'im_noise': array([ 0.005 ,  0.0158,  0.05  ,  0.1581,  0.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'sigma_noise': array([ 0.005 ,  0.0158,  0.05  ,  0.1581,  0.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'p_epsilon': array([ 0.01  ,  0.0316,  0.1   ,  0.3162,  1.    ])}
Studying CONDENSATION by changing image along variable(s) : {'v_init': array([  0.3   ,   0.9487,   3.    ,   9.4868,  30.    ])}
Studying CONDENSATION by changing image along variable(s) : {'v_prior': array([  5.0119e-01,   1.0593e+01,   2.2387e+02,   4.7315e+03,   1.0000e+05])}
Studying CONDENSATION by changing image along variable(s) : {'resample': array([ 0.1  ,  0.325,  0.55 ,  0.775,  1.   ])}
Studying CONDENSATION by changing image along variable(s) : {'D_x': array([  1.0000e-02,   1.0000e-01,   1.0000e+00,   1.0000e+01,   1.0000e+02])}
Studying CONDENSATION by changing image along variable(s) : {'D_V': array([  1.0000e-02,   1.0000e-01,   1.0000e+00,   1.0000e+01,   1.0000e+02])}
Studying CONDENSATION by changing image along variable(s) : {'sigma_motion': array([ 0.01  ,  0.0316,  0.1   ,  0.3162,  1.    ])}
Studying CONDENSATION by changing image along variable(s) : {'K_motion': array([ 0.0001,  0.0003,  0.001 ,  0.0032,  0.01  ])}
Studying CONDENSATION by changing image along variable(s) : {'dot_size': array([ 0.005 ,  0.0158,  0.05  ,  0.1581,  0.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'sigma_I': array([ 0.025 ,  0.0791,  0.25  ,  0.7906,  2.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'im_noise': array([ 0.005 ,  0.0158,  0.05  ,  0.1581,  0.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'sigma_noise': array([ 0.005 ,  0.0158,  0.05  ,  0.1581,  0.5   ])}
Studying CONDENSATION by changing image along variable(s) : {'p_epsilon': array([ 0.01  ,  0.0316,  0.1   ,  0.3162,  1.    ])}
Studying CONDENSATION by changing image along variable(s) : {'v_init': array([  0.3   ,   0.9487,   3.    ,   9.4868,  30.    ])}
Studying CONDENSATION by changing image along variable(s) : {'v_prior': array([  5.0119e-01,   1.0593e+01,   2.2387e+02,   4.7315e+03,   1.0000e+05])}
Studying CONDENSATION by changing image along variable(s) : {'resample': array([ 0.1  ,  0.325,  0.55 ,  0.775,  1.   ])}

TODO : show results with a widget


In [4]:
!git commit -m' SI controls ' ../notebooks/SI_controls* ../scripts/experiment_SI_controls*


[master 0e95ca3]  SI controls
 1 file changed, 2 insertions(+), 133 deletions(-)