Skip to content

Commit

Permalink
WIP: Add V1 draft
Browse files Browse the repository at this point in the history
  • Loading branch information
CBroz1 committed Jan 9, 2025
1 parent 9b31f90 commit c028c70
Show file tree
Hide file tree
Showing 4 changed files with 567 additions and 17 deletions.
7 changes: 4 additions & 3 deletions src/spyglass/spikesorting/v0/spikesorting_burst.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from itertools import combinations
from itertools import permutations
from typing import Dict, List, Tuple

import datajoint as dj
import matplotlib.pyplot as plt
import numpy as np
from datajoint.expression import QueryExpression
from scipy import stats
from spikeinterface.postprocessing.correlograms import (
WaveformExtractor,
Expand Down Expand Up @@ -315,7 +316,7 @@ def make(self, key) -> None:
ccgs, bins = self._compute_correlograms(key, params)

unit_pairs = []
for u1, u2 in combinations(units, 2):
for u1, u2 in permutations(units, 2):
unit_pairs.append(
{
**key,
Expand Down Expand Up @@ -400,7 +401,7 @@ def plot_by_sort_group_ids(self, key, sort_group_ids=None):
plt.suptitle(f"sort group {sg_id}", fontsize=20)

def _validate_pair(
self, query: dj.QueryExpression, unit1: int, unit2: int
self, query: QueryExpression, unit1: int, unit2: int
) -> Tuple[int, int]:
"""Ensure that unit1, unit2 is a valid pair in the table.
Expand Down
Loading

0 comments on commit c028c70

Please sign in to comment.