Python utils
- class python_utils.SpikeSim(path, sim_fname, neglect_t, neglect_t_end=-1, config_fname='')[source]
Class loading and parsing files given by a simulation. The main attributes are the simulation parameters and results:
end_t: end time of simulation
dt: time resolution of the simulation
- input_mode: external input mode:
0 (base mode): each neuron receives an indipendent poisson signal with mean frequency = SubNetwork::ext_in_rate
1 (not implemented)
data: dictionary with spike times corresponding to each population; data[‘pop’] is a list of np.arrays each containing the activity of a neuron
subnets: a list of the SubNetworks in the simulation
- histogram(pop='', res=1.0, save_img='')[source]
Method showing or saving the spiking activity of a given subnet
- Parameters:
pop (float) – desidered population; if ‘all’ is passed all population are showed.
res – time width of each bin in the histogram
save_img (string) – path and name of the file to be saved
- python_utils.load_pkl(path)[source]
Function loading an object from a pickle file.
- Parameters:
path (string) – path to the object to be loaded
- python_utils.newReadSpikes(file, n)[source]
Function reading spike times in the format produced by the simulation
- Parameters:
file (string) – path to the file with spike times