Exemplo n.º 1
0
    else: # run a simulation with parameters as set in simulation_parameters
        GP = simulation_parameters.global_parameters()
        GP.write_parameters_to_file() # write_parameters_to_file MUST be called before every simulation
        params = GP.params

    # TODO: update VisualInputParameters and possibly remove it completely
    # decide whether to load the default parameters or to take parameters from a file
    VIP = VisualInputParameters.VisualInputParameters()
    VIP.update_values(params)
    vi_params = VIP.params

    VI = VisualInput.VisualInput(vi_params) # pass parameters to the VisualInput module

    MT = MotionPrediction.MotionPrediction(params)
    BG = BasalGanglia.BasalGanglia(params)
    CC = CreateConnections.CreateConnections(params)
    CC.connect_mt_to_bg(MT, BG)


    for iteration in xrange(params['n_iterations']):
        # integrate the real world trajectory and the eye direction and compute spike trains from that
        stim = VI.compute_input(params['t_iteration'], BG.get_eye_direction())
        MT.compute_state(stim) # run the network for some time 
        BG.move_eye(MT.current_state)


#    """
#    First the stimulus is computed for a certain time
#    """
#    stimulus = VI.compute_input(params['t_integrate'])