unit_annotation.py
UnitAnnotation
¶
Bases: SpyglassMixin
, Manual
Source code in src/spyglass/spikesorting/analysis/v1/unit_annotation.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 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 128 129 130 131 132 133 134 135 136 137 138 |
|
Annotation
¶
Bases: SpyglassMixin
, Part
Source code in src/spyglass/spikesorting/analysis/v1/unit_annotation.py
fetch_unit_spikes(return_unit_ids=False)
¶
Fetch the spike times for a restricted set of units
Parameters:
Name | Type | Description | Default |
---|---|---|---|
return_unit_ids |
bool
|
whether to return unit ids with spike times, by default False |
False
|
Returns:
Type | Description |
---|---|
list of np.ndarray
|
list of spike times for each unit in the group, if return_unit_ids is False |
tuple of list of np.ndarray, list of str
|
list of spike times for each unit in the group and the unit ids, if return_unit_ids is True |
Source code in src/spyglass/spikesorting/analysis/v1/unit_annotation.py
add_annotation(key, **kwargs)
¶
Add an annotation to a unit. Creates the unit if it does not exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
dict
|
dictionary with key for Annotation |
required |
Raises:
Type | Description |
---|---|
ValueError
|
if unit_id is not valid for the sorting |
Source code in src/spyglass/spikesorting/analysis/v1/unit_annotation.py
fetch_unit_spikes(return_unit_ids=False)
¶
Fetch the spike times for a restricted set of units
Parameters:
Name | Type | Description | Default |
---|---|---|---|
return_unit_ids |
bool
|
whether to return unit ids with spike times, by default False |
False
|
Returns:
Type | Description |
---|---|
list of np.ndarray
|
list of spike times for each unit in the group, if return_unit_ids is False |
tuple of list of np.ndarray, list of str
|
list of spike times for each unit in the group and the unit ids, if return_unit_ids is True |