corr.py
Code adapted from International Brain Laboratory, T. (2021). ibllib [Computer software]. https://github.com/int-brain-lab/ibllib
xcorr(spike_times, spike_clusters, bin_size, window_size)
¶
Compute all pairwise cross-correlograms among the clusters appearing in spike_clusters
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spike_times |
ndarray
|
Spike times in seconds. |
required |
spike_clusters |
ndarray
|
Spike-cluster mapping. |
required |
bin_size |
float
|
Size of the time bin in seconds. |
required |
window_size |
int
|
Size of the correlogram window in seconds. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: cross-correlogram array |
Source code in element_array_ephys/plotting/corr.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
acorr(spike_times, bin_size, window_size)
¶
Compute the auto-correlogram of a unit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spike_times |
ndarray
|
Spike times in seconds. |
required |
bin_size |
float
|
Size of the time bin in seconds. |
required |
window_size |
int
|
Size of the correlogram window in seconds. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: auto-correlogram array (winsize_samples,) |
Source code in element_array_ephys/plotting/corr.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|