-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathexample_tab_layout.py
44 lines (36 loc) · 1.82 KB
/
example_tab_layout.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 8/31/22
# https://figurl.org/f?v=gs://figurl/spikesortingview-8&d=sha1://3eed6984bee0f75f23a29700a3ce0dc9c2b4c9b3&label=Tab%20layout%20example
import sortingview.views as vv
import spikeinterface.extractors as se
import spikeinterface as si
import kachery as ka
from example_autocorrelograms import example_autocorrelograms
from example_cross_correlograms import example_cross_correlograms
from example_raster_plot import example_raster_plot
from example_average_waveforms import example_average_waveforms
from example_units_table import example_units_table
from example_unit_similarity_matrix import example_unit_unit_similarity_matrix
def main():
ka.use_sandbox()
R, S = se.toy_example(num_units=12, duration=300, seed=0, num_segments=1)
assert isinstance(R, si.BaseRecording)
v_units_table = example_units_table(recording=R, sorting=S)
v_raster_plot = example_raster_plot(recording=R, sorting=S)
v_autocorrelograms = example_autocorrelograms(sorting=S)
v_average_waveforms = example_average_waveforms(recording=R, sorting=S)
v_cross_correlograms = example_cross_correlograms(sorting=S)
v_unit_similarity_matrix = example_unit_unit_similarity_matrix(recording=R, sorting=S)
view = vv.TabLayout(
items=[
vv.TabLayoutItem(label="Units table", view=v_units_table),
vv.TabLayoutItem(label="Raster plot", view=v_raster_plot),
vv.TabLayoutItem(label="Autocorrelograms", view=v_autocorrelograms),
vv.TabLayoutItem(label="Avg waveforms", view=v_average_waveforms),
vv.TabLayoutItem(label="Cross correlograms", view=v_cross_correlograms),
vv.TabLayoutItem(label="Unit similarity matrix", view=v_unit_similarity_matrix),
]
)
url = view.url(label="Tab layout example")
print(url)
if __name__ == "__main__":
main()