Firing range (firing_range)

Calculation

The firing range indicates the dispersion of the firing rate of a unit across the recording. It is computed by taking the difference between the 95th percentile’s firing rate and the 5th percentile’s firing rate computed over short time bins (e.g. 10 s).

Expectation and use

Very high levels of firing ranges, outside of a physiological range, might indicate noise contamination.

Example code

import spikeinterface.qualitymetrics as sqm

# Combine a sorting and recording into a sorting_analyzer
firing_range = sqm.compute_firing_ranges(sorting_analyzer=sorting_analyzer)
# firing_range is a dict containing the unit IDs as keys,
# and their firing firing_range as values (in Hz).

References

spikeinterface.qualitymetrics.misc_metrics.compute_firing_ranges(sorting_analyzer, bin_size_s=5, percentiles=(5, 95), unit_ids=None, **kwargs)

Calculate firing range, the range between the 5th and 95th percentiles of the firing rates distribution computed in non-overlapping time bins.

Parameters
sorting_analyzer: SortingAnalyzer

A SortingAnalyzer object

bin_size_sfloat, default: 5

The size of the bin in seconds.

percentilestuple, default: (5, 95)

The percentiles to compute.

unit_idslist or None

List of unit ids to compute the firing range. If None, all units are used.

Returns
firing_rangesdict

The firing range for each unit.

Notes

Designed by Simon Musall and ported to SpikeInterface by Alessio Buccino.

Literature

Designed by Simon Musall and adapted to SpikeInterface by Alessio Buccino.