Population Spike Rate Histogram (PSRH) of CBGTC spike times¶
- class analyseur.cbgtc.visual.popurate.PSRH(spiketimes_superset)[source]¶
Bases:
objectThe Population Spike Rate Histogram (PSRH) Class is instantiated by passing
- Parameters:
spiketimes_superset – Dictionary returned using
LoadSpikeTimes
Methods
Return
matplotlib.pyplot.plot object
dictionary of population dynamics from the population rates
matplotlib.pyplot.plot object
The instance must first invoke
plot()before callinganalytics()orplot_ratevar()psrh gives a collective dynamics of the population ensemble
Use Case:
Setup
from analyseur.cbgtc.loader import LoadSpikeTimes loadST = LoadSpikeTimes("/full/path/to/spikes_GPi.csv") spiketimes_superset = loadST.get_spiketimes_superset() from analyseur.cbgtc.visual.popurate import PSRH my_psrh = PSRH(spiketimes_superset)
Population Spike Rate Histogram for the whole simulation window
my_psrh.plot()
PSRH for desired window and bin size
my_psrh.plot(window=(0,5), binsz=1) # time unit in seconds my_psrh.plot(window=(0,5), binsz=0.05)
Get the analytics
my_psrh.analytics()
View Firing Rate Variability
my_psrh.plot_ratevar()
- analytics(stimulus_onset=0)[source]¶
Extracts population dynamics from the population rates :param stimulus_onset: [OPTIONAL] default: 0 :return: dictionary
- plot(binsz=0.05, window=(0, 10), nucleus=None, show=True)[source]¶
Population Spiking Rate Histogram (PSRH) Firing Rate | | ~~~~~~~^^~~~~~^~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~~ | +-----------------------------------------------> Time (s) 0 2 4 6 8 10 Continuous curve represents the time-varying population firing rate across neurons.
Displays the Population Spike Rate Histogram (PSRH) of the given spike times (seconds) and returns the plot figure (to save if necessary).
- Parameters:
binsz – integer or float; defines the number of equal-width bins in the range [default: 50]
window – 2-tuple; defines upper and lower range of the bins but ignore lower and upper outliers [default: (0,10000)]
nucleus – string; [OPTIONAL] None or name of the nucleus
show – boolean [default: True]
- Returns:
object matplotlib.axes.Axes
window controls the binning range as well as the spike counting window
CBGT simulation was done in seconds so window (0, 10) signifies time 0 s to 10 s
- plot_ratevar()[source]¶
Population Rate Variability Mean ± STD Firing Rate Coefficient of Variation Firing Rate (Hz) CV ^ ^ | ~~~~~~ | ~~~^~~~~~~ | ~~~~~~~~~~~~ | ~~~~~~~~~~~~ | ~~~~~~Mean~~~~~~ | ~~~~~~~~~~~~~ | ~~ ± STD band ~~ | +-----------------------------> Time +---------------------------> Time 0 2 4 6 8 10 0 2 4 6 8 10 Left : population firing rate with variability band (Mean ± STD) Right: coefficient of variation of firing rates across neurons
Displays the Population Spike Rate Variability in terms of: Mean ± STD Variability and Coefficient of Variation.
- Returns:
object matplotlib.axes.Axes