-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.json
130 lines (130 loc) · 5.53 KB
/
settings.json
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// C++ style '//' comments are permitted to comment out the end of lines
// but block style i.e. '/*' will not work
{
"example": { // name for each profile of in this setting file
"controllers": {
"behavior_controller": {
"ip": "192.168.1.101",
//"ip": "127.0.0.1", // can alternatively use localhost for testing
//"send_port": 5000,
"send_port": 5000,
"receive_port": 5000
},
"position_controller": {
"ip": "192.168.1.102",
"send_port": 5005,
"receive_port": 5005
},
//"frame_sync": { // frame sync controller is optional and not normally used
// "ip": "192.168.1.103",
// "send_port": 5010,
// "receive_port": 5010
//}
},
"reward": {
"id": "reward"
},
// "sensors" is a list of all the sensors that need to be configured on
// the behavior arduino. See sensor manager class in behavior
// controller. Default sensor type is to read a ttl pulse/square wave
// input. a lickport type context is necessary for rewarding contexts.
"sensors": [
{
"type": "cap1188",
"pin": 3,
"sensor": 0,
"lights": true,
"sensitivity": 7,
"reset_pin": 5
},
//{
// "type": "piezoport",
// "pin": 0,
// "lick_threshold": 20,
// "lick_duration": 10
//},
//{
// "pin": 15 // for a TTL pulse sensor all that is needed is pin
//},
],
// "contexts" are time/space localized events that can be configured to
// occur along the track. See Context Manager in the behavior arduino
// code for more information
"contexts": [
{
// example of a gain shift of the position scale happening every other lap
"id": "gain",
"class": "gain_mod",
"gain": 2,
"locations": [1000],
"radius": 250,
"display_color": [100, 100, 150],
"decorators": [
{
"class": "scheduled_context",
"lap_list": [1],
"repeat": 2
}
]
},
// reward zones are an example of a context and can be configured
// in this list as well.
{
"id": "reward", // every context is required to have a
// unique id
"type": "operant", // specialized contexts are defined
// through the type field. operant type
// contexts are triggered via sensors i.e.
// the lickport
"max_duration": 5, // maximum time (in s) the context is allowed
// to be active
"valves": [52], // list of arduino pints to activate when the
// context starts
"durations": [60], // list of times to open valves for
"operant_rate": 2,
"radius": 50,
"report_pin": 7,
"initial_open": false,
"sensor": 3, // pin number associated with the sensor to trigger
// operant context.
"locations": 2,
// "locations": [500, 1500], // integer or list. list - list of
// locations to place context
// centroids. integer - number of
// locations to randomly shuffle
// context to. absent - context is
// active during entire trial
"display_color": [104,204,104], // color to make display
// indicating the location of
// this context
"decorators": [
{
"class": "scheduled_context",
"lap_list": [1],
"repeat": 2
}
]
}
],
"sync_pin": 23, // a ttl pulse is delivered at the beginning of each
// trial to the sync pin.
"trial_length": 300, // duration (in s) of the trial.
"position_lap_reset": true,
"position_scale": -2.18, // scales the position updates from aritrary
// unitst to mm. IMPORTANT! measure this value
// on each rig or position updates will be
// wrong
"track_length": 2000, // length of the track/treadmill belt.
"position_lap_reader": true,
"lap_offset": 300,
"comment_keys": {
"g": "grooming"
}
},
// the _system holde the data directory field. this does not get saved each
// trial and needs to be set to a directory where the program can write
// and store files. if windows, ensure to escape backslashes i.e. \\
"_system": {
"data_directory":"behaviorData"
}
}