spiketools.objects.Unit

class spiketools.objects.Unit(uid=None, spikes=None, channel=None, region=None, cluster=None)[source]

A Unit object.

Parameters:
uidstr

Unit ID.

spikes1d array

Spike times, in seconds.

channelstr

Channel label.

regionstr

Region label.

cluster1d array

Spike cluster.

__init__(uid=None, spikes=None, channel=None, region=None, cluster=None)[source]

Initialize a Unit object.

Methods

__init__([uid, spikes, channel, region, cluster])

Initialize a Unit object.

cv()

Compute coefficient of variation.

fano()

Compute fano factor.

firing_rate()

Compute average firing rate.

isis()

Compute inter-spike intervals.

shuffle([approach, n_shuffles])

Shuffle spikes to create surrogates.

spike_train()

Convert spike times into a spike train vector (binary).

cv()[source]

Compute coefficient of variation.

fano()[source]

Compute fano factor.

firing_rate()[source]

Compute average firing rate.

isis()[source]

Compute inter-spike intervals.

shuffle(approach='ISI', n_shuffles=1000, **kwargs)[source]

Shuffle spikes to create surrogates.

Parameters:
approach{‘ISI’, ‘BINCIRC’, ‘POISSON’, ‘CIRCULAR’}

Which approach to take for shuffling spike times.

n_shufflesint, optional, default: 1000

The number of shuffles to create.

kwargs

Additional keyword arguments for the shuffle functions. See shuffle_spikes for details.

spike_train()[source]

Convert spike times into a spike train vector (binary).