Closed chongxi closed 5 years ago
The problem is:
Before saving the json
:
prb:
0:[ 3 5 52 59]
1:[10 53 54 60]
2:[ 4 12 13 58]
3:[ 2 11 55 57]
4:[ 1 8 15 51]
5:[18 48 50 63]
6:[ 0 31 34 47]
7:[ 9 25 33 61]
8:[14 17 22 62]
9:[19 21 37 39]
10:[20 35 36 38]
11:[26 29 44 45]
12:[ 7 24 27 40]
13:[16 32 41 42]
14:[23 28 43 46]
15:[ 67 69 116 123]
16:[ 74 117 118 124]
17:[ 68 76 77 122]
18:[ 66 75 119 121]
19:[ 65 72 79 115]
20:[ 82 112 114 127]
21:[ 64 95 98 111]
22:[ 73 89 97 125]
23:[ 78 81 86 126]
24:[ 83 85 101 103]
25:[ 84 99 100 102]
26:[ 90 93 108 109]
27:[ 71 88 91 104]
28:[ 80 96 105 106]
29:[ 87 92 107 110]
aftet loading the json
:
prb:
0:[ 3 5 52 59]
1:[10 53 54 60]
2:[ 4 12 13 58]
3:[ 2 11 55 57]
4:[ 1 8 15 51]
5:[18 48 50 63]
6:[ 0 31 34 47]
7:[ 9 25 33 61]
8:[14 17 22 62]
9:[19 21 37 39]
10:[20 35 36 38]
11:[26 29 44 45]
12:[ 7 24 27 40]
13:[16 32 41 42]
14:[23 28 43 46]
15:[ 67 69 116 123]
16:[ 74 117 118 124]
17:[ 68 76 77 122]
18:[ 66 75 119 121]
19:[ 65 72 79 115]
20:[ 82 112 114 127]
21:[ 64 95 98 111]
22:[ 73 89 97 125]
23:[ 78 81 86 126]
24:[ 83 85 101 103]
25:[ 84 99 100 102]
26:[ 90 93 108 109]
27:[ 71 88 91 104]
28:[ 80 96 105 106]
29:[ 87 92 107 110]
30:[ 6 30 49 56]
31:[ 70 94 113 120]
32:[128 129 130 131]
33:[132 133 134 135]
34:[136 137 138 139]
35:[140 141 142 143]
36:[144 145 146 147]
37:[148 149 150 151]
38:[152 153 154 155]
39:[156 157 158 159]
for i in range(30,40):
prb.grp_dict.pop(i)
prb.show() works
So the fix could be, put the prb.grp_dict.keys()
into the json
file
Fix json save/load under python 3: (numpy.int is not serializable)
https://github.com/chongxi/spiketag/commit/03b876e6b7ee607461d709f988f3cc361db6ff95
Test showed, prb file (JSON)
save/load
spiketag fpga prb_file
to sync with FPGA
open-ephys
channel mapping
prb.save('./bow_tie_LL.json') prb.load('./bow_tie_LL.json') prb.show()
it give an error: