artifact.py
ArtifactDetectionParameters
¶
Bases: SpyglassMixin
, Lookup
Source code in src/spyglass/spikesorting/v1/artifact.py
insert_default()
classmethod
¶
ArtifactDetectionSelection
¶
Bases: SpyglassMixin
, Manual
Source code in src/spyglass/spikesorting/v1/artifact.py
insert_selection(key)
classmethod
¶
Insert a row into ArtifactDetectionSelection.
Automatically generates a unique artifact ID as the sole primary key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
dict
|
primary key of SpikeSortingRecording and ArtifactDetectionParameters |
required |
Returns:
Name | Type | Description |
---|---|---|
artifact_id |
str
|
the unique artifact ID serving as primary key for ArtifactDetectionSelection |
Source code in src/spyglass/spikesorting/v1/artifact.py
ArtifactDetection
¶
Bases: SpyglassMixin
, Computed
Source code in src/spyglass/spikesorting/v1/artifact.py
make(key)
¶
Populate ArtifactDetection with detected artifacts.
- Fetches...
- Artifact parameters from ArtifactDetectionParameters
- Recording analysis NWB file from SpikeSortingRecording
- Valid times from IntervalList
- Load the recording from the NWB file with spikeinterface
- Detect artifacts using module-level
_get_artifact_times
- Insert result into IntervalList with
artifact_id
asinterval_list_name
Source code in src/spyglass/spikesorting/v1/artifact.py
merge_intervals(intervals)
¶
Takes a list of intervals each of which is [start_time, stop_time] and takes union over intervals that are intersecting
Parameters:
Name | Type | Description | Default |
---|---|---|---|
intervals
|
_type_
|
description |
required |
Returns:
Type | Description |
---|---|
_type_
|
description |