From e06ba40a932c95f4302dcc3a5445aad202085350 Mon Sep 17 00:00:00 2001 From: Mayo Faulkner Date: Fri, 8 Dec 2023 10:33:38 +0000 Subject: [PATCH] add back fix for short probes --- atlaselectrophysiology/plot_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atlaselectrophysiology/plot_data.py b/atlaselectrophysiology/plot_data.py index db51324..f4a358f 100644 --- a/atlaselectrophysiology/plot_data.py +++ b/atlaselectrophysiology/plot_data.py @@ -407,6 +407,9 @@ def gain2level(gain): h = neuropixel.split_trace_header(h, shank=int(sr.meta.get('NP2.4_shank'))) else: h = neuropixel.trace_header(sr.major_version, nshank=np.unique(th['shank']).size) + idx = np.isin(h['ind'], th['ind']) + for k in h.keys(): + h[k] = h[k][idx] s0 = t * sr.fs tsel = slice(int(s0), int(s0) + int(1 * sr.fs))