def NESTSimulation(self, trial, stim): layer_IDs = self.newSimulation.NESTSimulation( data_analysis.loadSpikes(self.newSimulation.Params['N_LGN'], self.retina_labels, self.spike_folder, "retina", stim, trial, 0)) self.loadLayers(layer_IDs) [self.potentials, self.spikes ] = self.newSimulation.runSimulation(self.layers_to_record, self.layers_to_record, self.record_Vm) data_analysis.updatePSTH(self.simtime, self.spikes, self.layers_to_record, self.selected_cell, self.PSTHs, self.bin_size, self.layer_sizes)
def NESTSimulation(self, trial): layer_IDs = self.newSimulation.NESTSimulation( data_analysis.loadSpikes(self.newSimulation.Params['N_LGN'], self.retina_labels, self.spike_folder, "retina", self.stim, trial, 0)) self.loadLayers(layer_IDs) [self.potentials, self.spikes ] = self.newSimulation.runSimulation(self.layers_to_record, self.layers_to_record, self.record_Vm) data_analysis.updatePSTH(self.simtime, self.spikes, self.layers_to_record, self.selected_cell, self.PSTHs, self.bin_size, self.layer_sizes) if self.usetop_PSTHs: # Selected cells are passed as a list although the values of this list # are not used. layer_sizes is used instead. data_analysis.updatePSTH(self.simtime, self.spikes, self.layers_to_record, list(np.arange(2)), self.top_PSTHs, self.bin_size, self.layer_sizes)
if plot_spatial_tuning: plotSpatialTuning(ex,ex.newSimulation.Params['N'],stim,0,"../data/") if plot_area_response_curves: plotAreaResponse(ex,ex.newSimulation.Params['N'],stim,0,"../data/") if plot_RF: receptiveField(ex,ex.newSimulation.Params['N'],stim,0,"../data/") # Thalamocortical system else: # To load layer IDs from NEST layer_IDs = ex.newSimulation.NESTSimulation( data_analysis.loadSpikes(ex.newSimulation.Params['N_LGN'], ex.retina_labels,ex.spike_folder,"retina",stim,0,0,"../data/")) ex.loadLayers(layer_IDs) if plot_PSTHs: plotPSTHs(ex,ex.newSimulation.Params['N_LGN'],stim,ex.layer_sizes,"../data/") if plot_topPSTHs: plotTopographical(ex,ex.newSimulation.Params['N_LGN'],stim,ex.layer_sizes,"../data/") if plot_spatial_tuning: plotSpatialTuning(ex,ex.newSimulation.Params['N_LGN'],stim,ex.layer_sizes,"../data/") if plot_area_response_curves: plotAreaResponse(ex,ex.newSimulation.Params['N_LGN'],stim,ex.layer_sizes,"../data/") if plot_RF: