Skip to content

Commit f62d34a

Browse files
committed
Merge branch 'develop'
2 parents 8993ee6 + 738e2bc commit f62d34a

132 files changed

Lines changed: 16846 additions & 11401 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ sysinfo.txt
5858
# Crashlytics generated file
5959
crashlytics-build.properties
6060

61-
Assets/Resources_moved/AllenCCF/*.obj
62-
Assets/Resources_moved/AllenCCF/*.obj.meta
61+
# AddressableAssets
62+
Assets/AddressableAssets/3D/*
63+
Assets/AddressableAssets/IBL/*
64+
Assets/AddressableAssets/Textures/*
65+
6366
ServerData/*
64-
Assets/AddressableAssets/*
6567
Assets/Best HTTP/*
6668

6769

@@ -168,3 +170,4 @@ Assets/Unisave/Resources/UnisavePreferencesFile.asset
168170
Assets/Unisave/Resources/UnisavePreferencesFile.asset.meta
169171

170172
Assets/Resources.meta
173+
**/HelloSGLX-win/*

Assets/AddressableAssets/3D.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AddressableAssets/IBL.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AddressableAssets/Probes.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
To define a new probe electrode layout, add a new CSV file.
2+
3+
Imagine you are looking down onto the surface of the probe with the probe shanks pointing down. Start counting electrodes from the bottom-left shank. Go by shank (L->R), then row (B->T), then column (L->R). So elecrtodes 0,1 are the first row, 2,3 the next row, etc.
4+
5+
Provide an x (right), y (up), and z (depth, usually 0) coordinate for the bottom left corner as well as the width, height (going up), and depth of each electrode.
6+
7+
You can confirm that electrodes are correctly placed by turning on the Graphics setting for "Electrodes in scene" (off by default in WebGL).
8+
9+
10+
11+
To define a new probe selection layer, add a new TXT file.
12+
13+
The file should have a single line with a 0 or 1 for every electrode channel, indicating whether it is included in the selection. For Neuropixels probes the selection array should sum to 384.
14+
15+
A script is included to convert IMRO files to selection layers.
16+
17+
We include some sensible defaults for NP1/21/24 probes.

Assets/AddressableAssets/Probes/README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import pandas as pd
2+
import numpy as np
3+
4+
n_electrodes = 960
5+
n_cols = 2
6+
7+
columns = ['electrode','x','y','z','w','h','d','default','all','bank0','double_length']
8+
# neuropixels 1.0 1-shank
9+
electrodes = pd.DataFrame(np.zeros((n_electrodes, len(columns))), columns=columns)
10+
11+
# assume for now that the tip length is 200 um (they say 175, but it looks more like 200)
12+
tip_length = 200
13+
14+
pitch_row = 20
15+
pitch_col = 32
16+
17+
# the first column starts to the left of the tip (since the tip is chisel-shaped)
18+
# I'm not sure if it's right, but the probes appear to be 60 um wide in the electrode region, we'll center at 30
19+
20+
# odd rows start at 12um + 2um left of center
21+
# even rows start at 16um + 12 um left of center
22+
col_start = [-(12 + 2), -(16 + 12 +2)]
23+
24+
width = 12
25+
height = 12
26+
depth = 24
27+
28+
# only one shank
29+
count = 0
30+
31+
# row
32+
for r in np.arange(n_electrodes/n_cols):
33+
y_pos = tip_length + r * pitch_row
34+
# column
35+
for c in np.arange(n_cols):
36+
x_pos = col_start[int(np.mod(r, 2))] + c * pitch_col
37+
38+
# also compute the selection layers
39+
bank0 = count < 384
40+
bank0odd_bank1even = 1 if (c==1 and count < 384) or (c==0 and count >= 384 and count < 768) else 0
41+
42+
# set a default selection layer and an all layer
43+
default = bank0
44+
all = True
45+
46+
electrodes.iloc[count] = [count, x_pos, y_pos, 0, width, height, depth, default, all, bank0, bank0odd_bank1even]
47+
count += 1
48+
49+
electrodes.to_csv('./neuropixels_1.csv', index=False)
50+
51+
52+
# neuropixels 2.0 4-shank // we're just going to generate the channel map for a single shank
53+
n_electrodes = 1280
54+
n_cols = 2
55+
56+
columns = ['electrode','x','y','z','w','h','d','default','all','bank0','double_length','bank1','bank2','bank3','bank4']
57+
electrodes = pd.DataFrame(np.zeros((n_electrodes, len(columns))), columns=columns)
58+
59+
tip_length = 200
60+
61+
pitch_col = 32
62+
pitch_row = 15
63+
64+
# the first row starts *above* the tip (since the tip is chisel-shaped)
65+
col_start = -30
66+
67+
width = 12
68+
height = 12
69+
depth = 24
70+
71+
count = 0
72+
73+
# # shank
74+
# for s in np.arange(n_shanks):
75+
76+
# row
77+
for r in np.arange(n_electrodes/n_cols):
78+
y_pos = tip_length + r * pitch_row
79+
# column
80+
for c in np.arange(n_cols):
81+
x_pos = col_start + c * pitch_col
82+
83+
# compute selection layers
84+
bank0 = count < 96
85+
double_length = 1 if (c==1 and count < 96) or (c==0 and count >= 96 and count < (96*2)) else 0
86+
bank1 = count >= 96 and count < (96*2)
87+
bank2 = count >= (96*2) and count < (96*3)
88+
bank3 = count >= (96*3) and count < (96*4)
89+
bank4 = count >= (96*4) and count < (96*5)
90+
91+
default = bank0
92+
all = True
93+
94+
electrodes.iloc[count] = [count, x_pos, y_pos, 0, width, height, depth, default, all,
95+
bank0, double_length, bank1, bank2, bank3, bank4]
96+
count += 1
97+
98+
electrodes.to_csv('./neuropixels_2.csv', index=False)

Assets/AddressableAssets/Probes/generate_neuropixels.py.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import pandas as pd
2+
import numpy as np
3+
4+
# 128K
5+
6+
# electrodes are in a l/c/r three column set, l/r are identical
7+
8+
n_elec_lr = 10
9+
lr_start_y = 50
10+
lr_pitch_x = 25
11+
12+
n_elec_c = 12
13+
c_start_y = 15
14+
c_start_y_high = 15+10+15+10+15
15+
16+
pitch_y = 15+10
17+
18+
19+
columns = ['electrode','x','y','z','w','h','d','default','all']
20+
electrodes = pd.DataFrame(np.zeros((n_elec_lr*2 + n_elec_c, len(columns))), columns=columns)
21+
22+
# electrode # ordering is a bit weird, it's 0/1 on center, then 2l 3r 4c, etc
23+
electrodes.iloc[0] = [0, -5, c_start_y, 0, 10, 10, 23, 1, 1]
24+
electrodes.iloc[1] = [1, -5, c_start_y+pitch_y, 0, 10, 10, 23, 1, 1]
25+
26+
for ei in np.arange(0,30):
27+
type = np.mod(ei,3)
28+
row = np.floor(ei / 3)
29+
30+
if type == 0:
31+
# left
32+
electrodes.iloc[ei+2] = [ei+2, -22.5, lr_start_y + row * pitch_y, 0, 10, 10, 23, 1, 1]
33+
34+
elif type == 1:
35+
# right
36+
electrodes.iloc[ei+2] = [ei+2, 12.5, lr_start_y + row * pitch_y, 0, 10, 10, 23, 1, 1]
37+
38+
elif type == 2:
39+
# center
40+
electrodes.iloc[ei+2] = [ei+2, -5, c_start_y_high + row * pitch_y, 0, 10, 10, 23, 1, 1]
41+
42+
electrodes.to_csv('./ucla_128k.csv', index=False)
43+
44+
45+
# 256F
46+
47+
# electrodes are in a l/c/r three column set, l/r are identical
48+
49+
n_elec_lr = 42
50+
lr_start_y = 75
51+
lr_pitch_x = 20
52+
53+
n_elec_c = 44
54+
c_start_y = 25
55+
c_start_y_high = 55
56+
57+
pitch_y = 50
58+
59+
60+
columns = ['electrode','x','y','z','w','h','d','default','all']
61+
electrodes = pd.DataFrame(np.zeros((n_elec_lr*2 + n_elec_c, len(columns))), columns=columns)
62+
63+
# electrode # ordering is a bit weird, it's 0/1 on center, then 2l 3r 4c, etc
64+
electrodes.iloc[0] = [0, -5, 30, 0, 10, 10, 23, 1, 1]
65+
electrodes.iloc[1] = [1, -5, 45, 0, 10, 10, 23, 1, 1]
66+
67+
for ei in np.arange(0,126):
68+
type = np.mod(ei,3)
69+
row = np.floor(ei / 3)
70+
71+
if type == 0:
72+
# center
73+
electrodes.iloc[ei+2] = [ei+2, -5, c_start_y_high + row * pitch_y, 0, 10, 10, 23, 1, 1]
74+
75+
elif type == 1:
76+
# left
77+
electrodes.iloc[ei+2] = [ei+2, -20, lr_start_y + row * pitch_y, 0, 10, 10, 23, 1, 1]
78+
79+
elif type == 2:
80+
# right
81+
electrodes.iloc[ei+2] = [ei+2, 10, lr_start_y + row * pitch_y, 0, 10, 10, 23, 1, 1]
82+
83+
electrodes.to_csv('./ucla_256f.csv', index=False)

Assets/AddressableAssets/Probes/generate_ucla.py.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)