nwbwidgets.analysis package
Submodules
nwbwidgets.analysis.spikes module
- nwbwidgets.analysis.spikes.compute_smoothed_firing_rate(spike_times, tt, sigma_in_secs)[source]
Evaluate gaussian smoothing of spike_times at uniformly spaced array t :param spike_times: A 1D numpy ndarray of spike times :param tt: 1D array, uniformly spaced, e.g. the output of np.linspace or np.arange :param sigma_in_secs: standard deviation of the smoothing gaussian in seconds
- Returns
Gaussian smoothing evaluated at array t
- nwbwidgets.analysis.spikes.psth(data=None, sig=0.05, T=None, err=2, t=None, num_bootstraps=1000)[source]
- Find peristimulus time histogram smoothed by a gaussian kernel
The time units of the arrays in data, sig and t should be the same, e.g. seconds
- Parameters
data – A dictionary of channel names, and 1D numpy ndarray spike times, A numpy ndarray, where each row gives the spike times for each channel A 1D numpy ndarray, one list or tuple of floats that gives spike times for only one channel
sig – standard deviation of the smoothing gaussian. default 0.05
T – time interval [a,b], spike times strictly outside this interval are excluded
err – An integer, 0, 1, or 2. default 2 0 indicates no standard error computation 1 Poisson error 2 Bootstrap method over trials
t – 1D array, list or tuple indicating times to evaluate psth at
num_bootstraps – number of bootstraps. Effective only in computing error when err=2. default 10
- Returns
Rate, mean smoothed peristimulus time histogram t: 1D array, list or tuple indicating times psth is evaluated at E: standard error
- Return type
R