def simulator( model , N_timebins , candidate_subunits ): stimulus = simulate_retina.Stimulus( simulate_retina.white_gaussian ) bigU = gaussian2D_weights( model['cones'], candidate_subunits , sigma=model['sigma_spatial'][0] ) return simulate_retina.run_LNLEP( model , stimulus = stimulus , N_timebins = N_timebins , average_me = {'features':lambda x: model['nonlinearity'](np.dot(bigU,x))} )
def simulator( v2, N_filters, nonlinearity, N_cells , sigma_spatial , N_timebins ): retina = simulate_retina.LNLNP_ring_model( nonlinearity = nonlinearity , N_cells = N_cells , sigma_spatial = sigma_spatial ) # stimulus = simulate_retina.white_gaussian_stimulus( dimension = N_cells[0] , # sigma = 1. ) stimulus = simulate_retina.Stimulus( simulate_retina.white_gaussian ) return simulate_retina.run_LNLEP( retina , stimulus = stimulus , N_timebins = N_timebins , average_me = {'features':lambda x: NL(np.dot(filters,x))} )