Skip to content

Commit

Permalink
filter units
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-langfield committed Sep 25, 2023
1 parent cafba88 commit 40675f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions atlaselectrophysiology/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ def get_data(self):

data['clusters'] = self.one.load_object(self.eid, 'clusters', collection=self.probe_collection,
attribute=['metrics', 'peakToTrough', 'waveforms', 'channels'])

# filter out low spike units
min_firing_rate = 50. / 3600.
include_cond = data['clusters'].metrics["firing_rate"] > min_firing_rate
data['clusters'].metrics = data['clusters'].metrics[include_cond]
include_idx = include_cond.to_numpy()
for k, v in data['clusters'].items():
data['clusters'][k] = v[include_idx]

data['clusters']['exists'] = True

data['channels'] = self.one.load_object(self.eid, 'channels', collection=self.probe_collection,
Expand Down

0 comments on commit 40675f0

Please sign in to comment.