get_spiking_v1_merge_ids uses the same restriction for both SpikeSortingRecordingSelection and ArtifactDetectionSelection tables. A valid restriction for one may not be valid for the other. Should these be separated into two inputs, recording_restr and artifact_restr?
The collected recording IDs are then used with fetch1 which implies that there should be only one recording per entry in ArtifactDetectionSelection. This may be true, but is not enforced, as a secondary key.
This function could also be refactored to reduce the number of fetches. Perhaps this is replaced by long distance restriction?
https://github.com/LorenFrankLab/spyglass/blob/03e39960e31bb358ba3f112220a5fdbb2e6acc76/src/spyglass/spikesorting/v1/utils.py#L37-L71
get_spiking_v1_merge_ids
uses the same restriction for bothSpikeSortingRecordingSelection
andArtifactDetectionSelection
tables. A valid restriction for one may not be valid for the other. Should these be separated into two inputs,recording_restr
andartifact_restr
?The collected recording IDs are then used with
fetch1
which implies that there should be only one recording per entry inArtifactDetectionSelection
. This may be true, but is not enforced, as a secondary key.This function could also be refactored to reduce the number of fetches. Perhaps this is replaced by long distance restriction?