Skip to content

Commit c0c6661

Browse files
committed
add needles viewer
1 parent bd7998d commit c0c6661

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

viewspikes/examples.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from ibllib.ephys import neuropixel
77
from ibllib.dsp import voltage
88

9+
from iblapps.needles2 import run_needles2
910
from iblapps.viewspikes.data import stream, get_ks2, get_spikes
1011
from iblapps.viewspikes.plots import plot_insertion, show_psd, overlay_spikes
1112

@@ -16,13 +17,14 @@
1617
sr, dsets = stream(pid, t0=t0, one=one, cache=True)
1718

1819
## Example 2: Plot Insertion for a given PID (todo: use Needles 2 for interactive)
19-
plot_insertion(pid, one=one)
20+
av = run_needles2.view(lazy=True)
21+
av.add_insertion_by_id(pid)
2022

2123
## Example 3: Show the PSD
2224
raw = sr[:, :-1].T
2325
show_psd(raw, sr.fs)
2426

25-
## Example 4: Display the raw / pre-proc and KS2 parts
27+
## Example 4: Display the raw / pre-proc and KS2 parts -
2628
h = neuropixel.trace_header()
2729
sos = scipy.signal.butter(3, 300 / sr.fs / 2, btype='highpass', output='sos')
2830
butt = scipy.signal.sosfiltfilt(sos, raw)

0 commit comments

Comments
 (0)